Conversation
…push reads through the handler chain
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #256 +/- ##
==========================================
- Coverage 87.85% 87.79% -0.06%
==========================================
Files 499 499
Lines 72540 72545 +5
==========================================
- Hits 63728 63692 -36
- Misses 8812 8853 +41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If read messages are created by
handle_event()in a handler and placed into the read outs queue, those messages will not reach the endpoint handler until the next call toRTCPeerConnection::handle_read()(ie, when next incoming packet is processed). This can cause read messages to get 'stuck' in the queues until an incoming packet arrives.Specifically, I've observed this happening to channel open messages for negotiated data channels, but it's possible other messages are affected as well.
This PR fixes the issue by also allowing
RTCPeerConnection::poll_reads()to 'pump' the read queue in the same way thathandle_read()does by creating a sharedpump_reads()function that bothpoll_read()andhandle_read()can call.