diff --git a/src/component/internal/webrtc.ts b/src/component/internal/webrtc.ts index 95221516..19bb8b64 100644 --- a/src/component/internal/webrtc.ts +++ b/src/component/internal/webrtc.ts @@ -281,7 +281,7 @@ export class NekoWebRTC extends EventEmitter { this._log.warn(`unable to generate video snap`, { error }) } - this._peer.close() + this.onDisconnected(new Error('connection closed')) } public addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender {