feat: use pnpm & lock core-js shim
This commit is contained in:
@@ -9,7 +9,7 @@ export class WebSocketManager {
|
||||
constructor() {
|
||||
process.on('exit', () => {
|
||||
for (const client of this.clients.values()) {
|
||||
client.close(0, `client ${client.id} close connect`)
|
||||
client.close(1000, `client ${client.id} close connect due process exit.`)
|
||||
}
|
||||
this.clients.clear()
|
||||
})
|
||||
|
||||
@@ -711,6 +711,7 @@ export class Socket extends Emitter<{}, {}, SocketReservedEvents> {
|
||||
* @api private
|
||||
*/
|
||||
private resetPingTimeout() {
|
||||
// @ts-ignore
|
||||
this.clearTimeoutFn(this.pingTimeoutTimer)
|
||||
this.pingTimeoutTimer = this.setTimeoutFn(() => {
|
||||
this.onClose("ping timeout")
|
||||
@@ -919,6 +920,7 @@ export class Socket extends Emitter<{}, {}, SocketReservedEvents> {
|
||||
) {
|
||||
debug('socket close with reason: "%s"', reason)
|
||||
|
||||
// @ts-ignore
|
||||
// clear timers
|
||||
this.clearTimeoutFn(this.pingTimeoutTimer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user