Compare commits

..

No commits in common. "3ce2313c5a64dd547376af00925b3dc65c1032e3" and "035be11686e8f2460bad3dcdfd3990e954127c56" have entirely different histories.

2 changed files with 2 additions and 2 deletions

2
dist/peer.js vendored
View File

@ -53,7 +53,7 @@ class Peer {
self._socket.emit("data", m); self._socket.emit("data", m);
}, },
async onclose() { async onclose() {
self._socket?.destroy(); self._socket?.end();
await self._onclose?.(self._socket); await self._onclose?.(self._socket);
}, },
}); });

View File

@ -90,7 +90,7 @@ export default class Peer {
self._socket.emit("data", m); self._socket.emit("data", m);
}, },
async onclose() { async onclose() {
self._socket?.destroy(); self._socket?.end();
await self._onclose?.(self._socket); await self._onclose?.(self._socket);
}, },
}); });