From 56b1aa92f4e6fc78d5f8a829eb9d534d89430813 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Mon, 15 Feb 2021 15:42:10 +0100 Subject: [PATCH] add WebRTC timeouts. --- server/internal/webrtc/webrtc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/internal/webrtc/webrtc.go b/server/internal/webrtc/webrtc.go index 325f589c..d688f9ca 100644 --- a/server/internal/webrtc/webrtc.go +++ b/server/internal/webrtc/webrtc.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "strings" + "time" "github.com/pion/interceptor" "github.com/pion/webrtc/v3" @@ -98,6 +99,7 @@ func (manager *WebRTCManager) CreatePeer(id string, session types.Session) (stri settings.SetEphemeralUDPPortRange(manager.config.EphemeralMin, manager.config.EphemeralMax) settings.SetNAT1To1IPs(manager.config.NAT1To1IPs, webrtc.ICECandidateTypeHost) + settings.SetICETimeouts(6 * time.Second, 6 * time.Second, 3 * time.Second) settings.SetSRTPReplayProtectionWindow(512) // Create MediaEngine based off sdp