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
Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event. The optional callback will be called once the 'close' event occurs. Unlike that event, it will be called with an Error as its only argument if the server was not open when it was closed.
So, how is it better than using native close function?
The text was updated successfully, but these errors were encountered:
nodejs/node#2642 is a good read. It has to do with the keep-alive connections. You can basically keep making requests on a connection that is marked as a "keep-alive".
According to Net module documentation https://nodejs.org/api/net.html#net_server_close_callback
So, how is it better than using native
close
function?The text was updated successfully, but these errors were encountered: