You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a second terminal, run node client.mjs to open a WebSocket connection
In the first terminal, stop the application (Ctrl+C)
In the first terminal, run npm install && npm start again -> You get an Error: listen EADDRINUSE: address already in use :::3000 because the application didn't terminate before.
Expected behavior
The application should have shutdown completely and starting it again should not be an issue.
Package
I don't know. Or some 3rd-party package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other (see below)
Other package
No response
NestJS version
10.3.2
Packages versions
[Nest CLI]
Nest CLI Version : 10.3.2
[Nest Platform Information]
platform-express version : 10.3.2
platform-ws version : 10.3.2
websockets version : 10.3.2
schematics version : 10.1.1
testing version : 10.3.2
common version : 10.3.2
core version : 10.3.2
cli version : 10.3.2
Node.js version
20.12.2
In which operating systems have you tested?
macOS
Windows
Linux
Other
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current behavior
The application shutdown hangs when shutdown hooks are enabled and there are existing (open) websocket connections.
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-1jpeel?file=src%2Fmain.ts&view=editor
Steps to reproduce
npm install && npm start
node client.mjs
to open a WebSocket connectionCtrl+C
)npm install && npm start
again -> You get anError: listen EADDRINUSE: address already in use :::3000
because the application didn't terminate before.Expected behavior
The application should have shutdown completely and starting it again should not be an issue.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
10.3.2
Packages versions
[Nest CLI]
Nest CLI Version : 10.3.2
[Nest Platform Information]
platform-express version : 10.3.2
platform-ws version : 10.3.2
websockets version : 10.3.2
schematics version : 10.1.1
testing version : 10.3.2
common version : 10.3.2
core version : 10.3.2
cli version : 10.3.2
Node.js version
20.12.2
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: