net: don't throw on net.Server.close()
authorcjihrig <cjihrig@gmail.com>
Fri, 16 May 2014 02:48:27 +0000 (22:48 -0400)
committerFedor Indutny <fedor@indutny.com>
Sun, 18 May 2014 13:59:52 +0000 (17:59 +0400)
commitf1dc55d7018e2669550a8be2c5b6c091da616483
tree8297c2e2718c07e3fe322e9d6b16af3398cfd6ba
parent655ec2113aeb1050f26f714b43992c162ec168e2
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>
doc/api/net.markdown
lib/net.js
test/simple/test-http-unix-socket.js