peer connection SetLocalDescription error catch.
This commit is contained in:
parent
2f0b159ad6
commit
4093bc5311
1 changed files with 4 additions and 1 deletions
|
|
@ -142,7 +142,10 @@ func (manager *WebRTCManager) CreatePeer(id string, session types.Session) (stri
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
connection.SetLocalDescription(description)
|
if err := connection.SetLocalDescription(description); err != nil {
|
||||||
|
return "", manager.config.ICELite, manager.config.ICEServers, err
|
||||||
|
}
|
||||||
|
|
||||||
connection.OnConnectionStateChange(func(state webrtc.PeerConnectionState) {
|
connection.OnConnectionStateChange(func(state webrtc.PeerConnectionState) {
|
||||||
switch state {
|
switch state {
|
||||||
case webrtc.PeerConnectionStateDisconnected:
|
case webrtc.PeerConnectionStateDisconnected:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue