summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2014-05-15 22:48:27 -0400
committerFedor Indutny <fedor@indutny.com>2014-05-18 17:59:52 +0400
commitf1dc55d7018e2669550a8be2c5b6c091da616483 (patch)
tree8297c2e2718c07e3fe322e9d6b16af3398cfd6ba /doc
parent655ec2113aeb1050f26f714b43992c162ec168e2 (diff)
downloadandroid-node-v8-f1dc55d7018e2669550a8be2c5b6c091da616483.tar.gz
android-node-v8-f1dc55d7018e2669550a8be2c5b6c091da616483.tar.bz2
android-node-v8-f1dc55d7018e2669550a8be2c5b6c091da616483.zip
net: don't throw on net.Server.close()
When close() is called on a non-listening server, a synchronous error is thrown. This commit causes the error to be passed to the asynchronous callback function instead. Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/net.markdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/net.markdown b/doc/api/net.markdown
index 957b7085e5..a6bf2f641f 100644
--- a/doc/api/net.markdown
+++ b/doc/api/net.markdown
@@ -206,7 +206,8 @@ 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. Optionally, you can pass a callback to listen for the `'close'`
-event.
+event. If present, the callback is invoked with any potential error
+as the first and only argument.
### server.address()