websocket
websocket copied to clipboard
[Question] Close connections on server shutdown
Whenever the server is shutdown (e.g. CTRL-C), are all WebSocket connections shutdown as well automatically? Does the upgrader notice a server shutdown and subsequently closes all connections, waiting for all to be finished, or is this something I have to check manually?
This library does not implement the feature because the Go standard library does not provide a way for libraries to register code to execute at shutdown. Implement the feature in your application.
The operating system automatically closes the lower-level network connections on program exit. Clients will detect that the network connections are closed.