Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
fix: removed listener once connection is closed (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Apr 25, 2023
1 parent e296cf9 commit 1a9d6e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ export class WebRTCDirectTransport implements Transport {
case 'closed':
maConn.close().catch((err) => {
log.error('error closing connection', err)
}).finally(() => {
peerConnection.removeEventListener(eventListeningName, () => {})
})
break

default:
break
}
Expand Down

0 comments on commit 1a9d6e1

Please sign in to comment.