Repository navigation
Conversation
yummybomb
force-pushed
the
hypeship/webrtc-profile-permissions
branch
from
November 18, 2026 21:40
ef5b412 to
d6275d1
Compare
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.
Stacked on #33.
Summary
Revoking watch permission should close the session's WebRTC peer even if it hasn't started streaming. Keep the one-second delay for legacy clients, but don't use
IsWatchingto decide whether to schedule cleanup.When the timer fires, check the current permissions and select the peer before releasing the profile lock. Close that peer outside the locks. If permission was restored in the meantime, a replacement peer is left alone.
Testing
The session tests cover a pending peer when permission stays revoked, and a replacement peer (pending or streaming) when permission is restored before the timer fires.
From
server/,go test ./...,go test -race -count=20 ./internal/session ./internal/webrtc, andgo vet ./internal/session ./internal/webrtcpassed.