fix tests

This commit is contained in:
Alexis PIRES 2020-01-06 14:25:53 +01:00
parent 994c20d585
commit 3650f836ae
1 changed files with 6 additions and 2 deletions

View File

@ -78,7 +78,7 @@ func (cc *Conn) Flush() error {
}
// Trigger entities callback
for checkReceive(conn) {
for cc.checkReceive(conn) {
rmsg, err := conn.Receive()
if err != nil {
@ -95,7 +95,11 @@ func (cc *Conn) Flush() error {
return nil
}
func checkReceive(c *netlink.Conn) bool {
func (cc *Conn) checkReceive(c *netlink.Conn) bool {
if cc.TestDial != nil {
return false
}
sc, err := c.SyscallConn()
var n int