mirror of
https://github.com/jech/galene.git
synced 2024-12-22 23:35:46 +01:00
Don't hide mismatches in the PeerConnection state automaton.
The previous behaviour led to silent failures, which was confusing.
This commit is contained in:
parent
f4811e8cf5
commit
f34ec0ab66
1 changed files with 7 additions and 11 deletions
|
@ -569,16 +569,12 @@ func gotAnswer(c *webClient, id string, sdp string) error {
|
|||
return ErrUnknownId
|
||||
}
|
||||
|
||||
if down.pc.SignalingState() == webrtc.SignalingStateStable {
|
||||
log.Printf("Got answer in stable state -- this shouldn't happen")
|
||||
} else {
|
||||
err := down.pc.SetRemoteDescription(webrtc.SessionDescription{
|
||||
Type: webrtc.SDPTypeAnswer,
|
||||
SDP: sdp,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err := down.pc.SetRemoteDescription(webrtc.SessionDescription{
|
||||
Type: webrtc.SDPTypeAnswer,
|
||||
SDP: sdp,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, t := range down.tracks {
|
||||
|
@ -590,7 +586,7 @@ func gotAnswer(c *webClient, id string, sdp string) error {
|
|||
}
|
||||
}
|
||||
|
||||
err := down.flushICECandidates()
|
||||
err = down.flushICECandidates()
|
||||
if err != nil {
|
||||
log.Printf("ICE: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue