Close netlink connection after flushing commands (#1)

This commit is contained in:
Matt Layher 2018-06-09 09:12:55 -04:00 committed by Michael Stapelberg
parent 0fe8ac05ad
commit 4de6a4e001
1 changed files with 2 additions and 0 deletions

View File

@ -264,6 +264,8 @@ func (cc *Conn) Flush() error {
return err
}
defer conn.Close()
if _, err := conn.SendMessages(batch(cc.messages)); err != nil {
return fmt.Errorf("SendMessages: %v", err)
}