Repository navigation
fix: close a peer connection at once while another call still uses it - #524
Merged
Merged
Conversation
Since the handle leases, close() put off closing the connection until no other thread was in one of its methods, so the connection kept running, and took new tracks, after close() had returned. It is now closed right away (right after the callback when called from one); only freeing the observer and the connection waits for those methods.
…urned The result of setting the description is dropped only when the connection is freed right after the callback, which waits for methods running on other threads: the createOffer of the test thread had not always returned.
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.
close()put off closing the connection until no other thread was in one of its methods, so the connection kept running, and accepted new tracks, afterclose()had returned. It is now closed right away (right after the callback when called from one); only freeing the observer and the connection waits for those methods.closeBeforeDescriptionResultFailsObservercloses in the callback only oncecreateOfferhas returned, since a pending result is dropped only when the connection is freed. This test failed on main since fix: dispose native objects once and keep them while a call still uses them #520.