Skip to content

Commit

Permalink
lint and timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 committed Jun 12, 2024
1 parent 71cf66a commit 949c793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/linters/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
# see https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
run:
timeout: 60m
skip-dirs:
issues:
exclude-dirs:
- gnmi/oc
- integration_tests # Loading ondatra is very slow
issues:
exclude:
- "grpc.Dial is deprecated" # TODO: Remove this once UDS is resolved
- "grpc.DialContext is deprecated"
exclude-rules:
- path: _test\.go
linters:
Expand Down
3 changes: 2 additions & 1 deletion dataplane/standalone/pkthandler/pktiohandler/pktiohandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,15 @@ func (m *PacketIOMgr) queueRead(id uint64, done chan struct{}) {
default:
n, err := p.Read(buf)
if err != nil || n == 0 {
time.Sleep(time.Millisecond)
continue
}
pkt := &pktiopb.Packet{
HostPort: id,
Frame: buf[0:n],
}
m.sendQueue.Write(pkt)
time.Sleep(time.Microsecond)
time.Sleep(time.Millisecond)
}
}
}()
Expand Down

0 comments on commit 949c793

Please sign in to comment.