diff --git a/src/peer.ts b/src/peer.ts index 3655324..f3443a9 100644 --- a/src/peer.ts +++ b/src/peer.ts @@ -90,7 +90,7 @@ export default class Peer { self._socket.emit("data", m); }, async onclose() { - self._socket?.end(); + self._socket?.destroy(); await self._onclose?.(self._socket); }, });