Skip to content

Commit 412daa4

Browse files
authored
webrtc: wait for listener context before dropping connection (#2932)
1 parent f535990 commit 412daa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

p2p/transport/webrtc/listener.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ func (l *listener) listen() {
137137
}
138138

139139
select {
140-
case <-ctx.Done():
141-
log.Warn("could not push connection: ctx done")
140+
case <-l.ctx.Done():
141+
log.Debug("dropping connection, listener closed")
142142
conn.Close()
143143
case l.acceptQueue <- conn:
144144
// acceptQueue is an unbuffered channel, so this blocks until the connection is accepted.

0 commit comments

Comments
 (0)