diff --git a/src/RTCPeerConnection.ts b/src/RTCPeerConnection.ts index 9cfe1a540..4315e2f3f 100644 --- a/src/RTCPeerConnection.ts +++ b/src/RTCPeerConnection.ts @@ -326,6 +326,10 @@ export default class RTCPeerConnection extends EventTarget { + if (this.connectionState === 'closed') { + throw new Error('Peer Connection is closed'); + } + log.debug(`${this._pcId} addIceCandidate`); if (!candidate || !candidate.candidate) {