From 7cc8b07ca3d51b3f141157255ec244dba9125022 Mon Sep 17 00:00:00 2001 From: pggiroro Date: Tue, 20 Feb 2024 16:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E8=80=85=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=9B=91=E5=90=ACPeerConnectionStateClosed=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subscriber.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subscriber.go b/subscriber.go index 9931060..8315cbc 100644 --- a/subscriber.go +++ b/subscriber.go @@ -235,7 +235,7 @@ func (suber *WebRTCSubscriber) OnEvent(event any) { suber.PeerConnection.Close() }() } - case PeerConnectionStateDisconnected, PeerConnectionStateFailed: + case PeerConnectionStateDisconnected, PeerConnectionStateFailed, PeerConnectionStateClosed: suber.Stop(zap.String("reason", pcs.String())) } })