mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-07 16:54:37 +00:00
wgengine/magicsock: don't deadlock on shutdown if sending blocks.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
0249236cc0
commit
9265296b33
@ -713,7 +713,11 @@ func newPinger(t *testing.T, logf logger.Logf, src, dst *magicStack) (cleanup fu
|
|||||||
// acceptable to test instead of "every ping must
|
// acceptable to test instead of "every ping must
|
||||||
// transit".
|
// transit".
|
||||||
pkt := tuntest.Ping(dst.IP(t).IPAddr().IP, src.IP(t).IPAddr().IP)
|
pkt := tuntest.Ping(dst.IP(t).IPAddr().IP, src.IP(t).IPAddr().IP)
|
||||||
src.tun.Outbound <- pkt
|
select {
|
||||||
|
case src.tun.Outbound <- pkt:
|
||||||
|
case <-ctx.Done():
|
||||||
|
return false
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case <-dst.tun.Inbound:
|
case <-dst.tun.Inbound:
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user