]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: prevent spurious errors while closing a device
authorJosh Bleecher Snyder <josh@tailscale.com>
Mon, 14 Dec 2020 21:34:03 +0000 (13:34 -0800)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 15 Dec 2020 17:08:24 +0000 (18:08 +0100)
commit6d9ecb7edbe74471d441ee2cce889612455b8354
treeeeb2983913169f87e129d1e7cd295bd0efde49c6
parent5e92865404f56c6f7f2aaa784d2588f310d2d8a7
device: prevent spurious errors while closing a device

When closing a device, packets that are in flight
can make it to SendBuffer, which then returns an error.
Those errors add noise but no light;
they do not reflect an actual problem.

Adding the synchronization required to prevent
this from occurring is currently expensive and error-prone.
Instead, quietly drop such packets instead of
returning an error.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
device/peer.go