Log ICE candidates on peer connection established to get remote also (#922)
This commit is contained in:
@@ -325,7 +325,6 @@ func (t *PCTransport) onICEGatheringStateChange(state webrtc.ICEGathererState) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
t.logICECandidates()
|
|
||||||
go func() {
|
go func() {
|
||||||
t.lock.Lock()
|
t.lock.Lock()
|
||||||
if t.restartAfterGathering {
|
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())
|
t.params.Logger.Infow("peer connection state change", "state", state.String())
|
||||||
switch state {
|
switch state {
|
||||||
case webrtc.PeerConnectionStateConnected:
|
case webrtc.PeerConnectionStateConnected:
|
||||||
|
t.logICECandidates()
|
||||||
isInitialConnection := t.setConnectedAt(time.Now())
|
isInitialConnection := t.setConnectedAt(time.Now())
|
||||||
if isInitialConnection {
|
if isInitialConnection {
|
||||||
if t.onInitialConnected != nil {
|
if t.onInitialConnected != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user