Log ICE candidates on peer connection established to get remote also (#922)

This commit is contained in:
Raja Subramanian
2022-08-16 15:31:16 +05:30
committed by GitHub
parent d9fdcf8c2b
commit 3f53dea223
+1 -1
View File
@@ -325,7 +325,6 @@ func (t *PCTransport) onICEGatheringStateChange(state webrtc.ICEGathererState) {
return
}
t.logICECandidates()
go func() {
t.lock.Lock()
if t.restartAfterGathering {
@@ -408,6 +407,7 @@ func (t *PCTransport) onPeerConnectionStateChange(state webrtc.PeerConnectionSta
t.params.Logger.Infow("peer connection state change", "state", state.String())
switch state {
case webrtc.PeerConnectionStateConnected:
t.logICECandidates()
isInitialConnection := t.setConnectedAt(time.Now())
if isInitialConnection {
if t.onInitialConnected != nil {