Skip to content

Commit

Permalink
修复断开socket.io连接时没有关闭socket的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mybios committed Dec 13, 2024
1 parent eb450a5 commit 070bec9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/pinus/lib/connectors/siosocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export class SioSocket extends EventEmitter implements ISocket {
}

this.state = ST_CLOSED;
this.socket.disconnect();
this.socket.disconnect(true);
this.socket.removeAllListeners();
this.socket = undefined;
}

sendBatch(msgs: any[]) {
Expand Down

0 comments on commit 070bec9

Please sign in to comment.