aboutsummaryrefslogtreecommitdiffstats
path: root/device/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/peer.go')
-rw-r--r--device/peer.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/device/peer.go b/device/peer.go
index 499888d..332f7bd 100644
--- a/device/peer.go
+++ b/device/peer.go
@@ -126,13 +126,8 @@ func (peer *Peer) SendBuffer(buffer []byte) error {
peer.device.net.RLock()
defer peer.device.net.RUnlock()
- if peer.device.net.bind == nil {
- // Packets can leak through to SendBuffer while the device is closing.
- // When that happens, drop them silently to avoid spurious errors.
- if peer.device.isClosed() {
- return nil
- }
- return errors.New("no bind")
+ if peer.device.isClosed() {
+ return nil
}
peer.RLock()