Merge pull request #355 from themighty1/upstreammaster

wait for success when sending packet to chan, don't error out after f…
This commit is contained in:
Gustavo Iñiguez Goia 2021-02-19 12:47:14 +01:00 committed by GitHub
commit 0dbd8e00ee
Failed to generate hash of commit

View file

@ -16,9 +16,9 @@ import (
"time"
"unsafe"
"github.com/evilsocket/opensnitch/daemon/log"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/evilsocket/opensnitch/daemon/log"
)
const (
@ -236,7 +236,7 @@ func go_callback(queueID C.int, data *C.uchar, length C.int, mark C.uint, idx ui
}
}
default:
fmt.Fprintf(os.Stderr, "Error sending packet to queue channel %d\n", idx)
case <-time.After(1 * time.Millisecond):
fmt.Fprintf(os.Stderr, "Timed out while sending packet to queue channel %d\n", idx)
}
}