Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

fix/ice-restarts #229

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/rooms/buffereddatachannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import (
"github.com/pion/webrtc/v3"
)

// @TODO: Probably for restarts, we do not want to close this channel.
// Instead we want to start and stop buffering depending on the state.

type BufferedDataChannel struct {
channel *webrtc.DataChannel
msgQueue chan []byte
Expand Down
2 changes: 1 addition & 1 deletion pkg/rooms/room.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func (r *Room) Handle(me *Member) {
Joined: &pb.Event_Joined{User: me.ToProto()},
},
})
case webrtc.ICEConnectionStateClosed, webrtc.ICEConnectionStateFailed:
case webrtc.ICEConnectionStateClosed:
r.onDisconnected(int64(me.id))
}
}
Expand Down