Skip to content

Commit

Permalink
netlink: document that Conn.Close bug #162 is fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <mdlayher@gmail.com>
  • Loading branch information
mdlayher committed Dec 20, 2020
1 parent ff9805b commit 7815448
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,7 @@ func (c *Conn) debug(fn func(d *debugger)) {
fn(c.d)
}

// Close closes the connection.
//
// Due to a bug https://github.com/mdlayher/netlink/issues/162, Close currently
// cannot unblock concurrent calls to Send or Receive. As a stop-gap measure,
// call SetDeadline with a time in the past such as time.Unix(1, 0) in a
// different goroutine to unblock a long-running Receive loop. The intent is to
// fix this issue in v1.2.0.
// Close closes the connection and unblocks any pending read operations.
func (c *Conn) Close() error {
// Close does not acquire a lock because it must be able to interrupt any
// blocked system calls, such as when Receive is waiting on a multicast
Expand Down

0 comments on commit 7815448

Please sign in to comment.