Stops accepting incoming messages and waits until current handlers are finished then disconnects WebSockets.
The correct procedure for shutdown, with Express for example, is to call shutdownWsHandlers and not await the result (though you may
wish to keep a reference to the promise), then immediately call close on your Express server reference, and then you may await for the
promised result of shutdownWsHandlers inside of the Express server close callback if you like. This is the correct procedure because
calling close on an Express instance only stop incoming connections and while keep-alive connections are open, the callback will
never be triggered.
Stops accepting incoming messages and waits until current handlers are finished then disconnects WebSockets.
The correct procedure for shutdown, with Express for example, is to call
shutdownWsHandlersand not await the result (though you may wish to keep a reference to the promise), then immediately callcloseon your Express server reference, and then you may await for the promised result ofshutdownWsHandlersinside of the Express serverclosecallback if you like. This is the correct procedure because callingcloseon an Express instance only stop incoming connections and whilekeep-aliveconnections are open, the callback will never be triggered.