SIGN IN SIGN UP
socketio / socket.io UNCLAIMED

Realtime application framework (Node.JS server)

0 0 0 TypeScript

fix(eio): discard all pending packets when the server is closed

In some specific cases, the transport was not closed right away,
leaving the Node.js process alive even after closing the server.
The HTTP long-polling transport would be closed after the heartbeat
failure and the `closeTimeout` delay (20 + 25 + 30 seconds).

Example:

```js
io.on("connection", (socket) => {
  // the writeBuffer is not empty, so the transport is not closed right away
  io.close();
});
```

Related: https://github.com/socketio/socket.io/issues/5088
D
Damien Arrachequesne committed
923a12e2de83ecaa75746a575e71a4739815d5c5
Parent: 13c6d2e