Conversation
6b04e0c to
a0a2c67
Compare
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
=======================================
Coverage 80.86% 80.87%
=======================================
Files 48 48
Lines 3962 3968 +6
=======================================
+ Hits 3204 3209 +5
- Misses 619 620 +1
Partials 139 139
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* Always close `Association` on `writeLoop` exit The connection will now always be closed on `writeLoop` exit because it will ensure that `readLoop` exits, which is needed to propagate the closing of `Stream`s. * Guard against creating `Stream`s after `Association` close It was possible for new `Stream`s to be created after `readLoop` has exited and called `unregisterStream` on the existing ones. The new `Stream`s would never close. This also guards against a potential panic due to send on nil channel (`acceptCh`). This may fix pion/webrtc#2098.
a0a2c67 to
e4d7a2f
Compare
|
@Sean-Der sure thing, done! |
Association and Stream closure
|
This PR breaks some tests in pion/webrtc. I suggest that make |
|
hi @mafredri, are you still interested in pushing this PR forward? |
Description
AssociationonwriteLoopexitThe connection will now always be closed on
writeLoopexit because itwill ensure that
readLoopexits, which is needed to propagate theclosing of
Streams.Streams afterAssociationcloseIt was possible for new
Streams to be created afterreadLoophasexited and called
unregisterStreamon the existing ones. The newStreams would never close.This also guards against a potential panic due to send on nil channel
(
acceptCh).Reference issue
Fixes pion/webrtc#2098 (with high probability)
Notes
Included a few fixes to tests to improve stability when run with
go test -race.