Skip to content

Commit

Permalink
Fix deadlock by buffering acceptCh channel
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyech committed Nov 13, 2023
1 parent cebed79 commit 5212ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/dtls/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (l *Listener) registerChannel(connID [handshake.RandomBytesLength]byte) (<-
return nil, fmt.Errorf("seed already registered")
}

connChan := make(chan net.Conn)
connChan := make(chan net.Conn, 1)
l.connMap[connID] = connChan

return connChan, nil
Expand Down

0 comments on commit 5212ab5

Please sign in to comment.