]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: use channel close to shut down and drain outbound channel
authorJosh Bleecher Snyder <josh@tailscale.com>
Tue, 15 Dec 2020 23:54:48 +0000 (15:54 -0800)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Jan 2021 13:49:44 +0000 (14:49 +0100)
commit2832e96339b4b847172741e9252020fc7bfa59af
tree782633f9de39040f88930c905bca6d803a870f9e
parent63066ce4062a85224821ce302e3eb8c34e95a658
device: use channel close to shut down and drain outbound channel

This is a similar treatment to the handling of the encryption
channel found a few commits ago: Use the closing of the channel
to manage goroutine lifetime and shutdown.
It is considerably simpler because there is only a single writer.

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