From 0fd302d877054f84b5d58f88f420117671208049 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 25 May 2020 01:07:05 +0200 Subject: [PATCH] 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. --- client.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/client.go b/client.go index d7f449f..52b5c8f 100644 --- a/client.go +++ b/client.go @@ -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) }