diff options
author | cjihrig <cjihrig@gmail.com> | 2014-05-15 22:48:27 -0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-05-18 17:59:52 +0400 |
commit | f1dc55d7018e2669550a8be2c5b6c091da616483 (patch) | |
tree | 8297c2e2718c07e3fe322e9d6b16af3398cfd6ba /doc | |
parent | 655ec2113aeb1050f26f714b43992c162ec168e2 (diff) | |
download | android-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.markdown | 3 |
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() |