Skip to content

Commit

Permalink
Fix deadlock when closing pipe
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Champlon <[email protected]>
  • Loading branch information
mat007 committed Dec 13, 2024
1 parent 542ebda commit 70746b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ func (l *win32PipeListener) Accept() (net.Conn, error) {
func (l *win32PipeListener) Close() error {
select {
case <-l.doneCh:
case <-l.closeCh:
default:
close(l.closeCh)
<-l.doneCh
Expand Down

0 comments on commit 70746b4

Please sign in to comment.