-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wgengine/magicsock: make receive from didCopy respect cancellation.
Very rarely, cancellation occurs between a successful send on derpRecvCh and a call to copyBuf on the receiving side. Without this patch, this situation results in <-copyBuf blocking indefinitely. Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
- Loading branch information
Dmytro Shynkevych
committed
Jul 16, 2020
1 parent
1f92312
commit 8918985
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I don't think this is correct. Did you mean break? But that's automatic.
This means the code below never runs, which means they're no synchronization on the derp buffer that
<-didCopy
was waiting for.The
didCopy
is never used now.