We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a278830 commit e6dde48Copy full SHA for e6dde48
pkg/sslnet/multicast_server.go
@@ -54,10 +54,14 @@ func (r *MulticastServer) receive() {
54
var currentIfiIdx = 0
55
for r.isRunning() {
56
ifis := interfaces(r.SkipInterfaces)
57
- currentIfiIdx = currentIfiIdx % len(ifis)
58
- ifi := ifis[currentIfiIdx]
59
- r.receiveOnInterface(ifi)
60
- currentIfiIdx++
+ if len(ifis) > 0 {
+ currentIfiIdx = currentIfiIdx % len(ifis)
+ ifi := ifis[currentIfiIdx]
+ r.receiveOnInterface(ifi)
61
+ currentIfiIdx++
62
+ } else {
63
+ currentIfiIdx = 0
64
+ }
65
if currentIfiIdx >= len(ifis) {
66
// cycled though all interfaces once, make a short break to avoid producing endless log messages
67
time.Sleep(1 * time.Second)
0 commit comments