We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5059401 commit ad1df21Copy full SHA for ad1df21
doc/api/net.markdown
@@ -228,9 +228,10 @@ shown below.
228
229
Stops the server from accepting new connections and keeps existing
230
connections. This function is asynchronous, the server is finally
231
-closed when all connections are ended and the server emits a `'close'`
232
-event. The last parameter `callback` will be added as an listener for the
233
-['close'][] event.
+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
234
+was not open when it was closed.
235
236
### server.address()
237
0 commit comments