Don't drop connections on ICE failure.
This spuriously breaks client-to-server connections over IPv6. Thanks to Fabien de Montgolfier for his help with debugging this.
This commit is contained in:
@@ -330,12 +330,6 @@ func addUpConn(c *client, id string) (*upConnection, error) {
|
||||
sendICE(c, id, candidate)
|
||||
})
|
||||
|
||||
pc.OnICEConnectionStateChange(func(state webrtc.ICEConnectionState) {
|
||||
if state == webrtc.ICEConnectionStateFailed {
|
||||
c.action(connectionFailedAction{id: id})
|
||||
}
|
||||
})
|
||||
|
||||
go rtcpUpSender(c, conn)
|
||||
|
||||
pc.OnTrack(func(remote *webrtc.Track, receiver *webrtc.RTPReceiver) {
|
||||
@@ -664,12 +658,6 @@ func addDownConn(c *client, id string, remote *upConnection) (*downConnection, e
|
||||
log.Printf("Got track on downstream connection")
|
||||
})
|
||||
|
||||
pc.OnICEConnectionStateChange(func(state webrtc.ICEConnectionState) {
|
||||
if state == webrtc.ICEConnectionStateFailed {
|
||||
c.action(connectionFailedAction{id: id})
|
||||
}
|
||||
})
|
||||
|
||||
if c.down == nil {
|
||||
c.down = make(map[string]*downConnection)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user