mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Problem: It's possible to run listen() on a net.Server that's already listening to a port. The result is silent failure, with the side effect of changing the connectionKey and or pipeName. Solution: throw an error if listen method called more than once. close() method should be called between listen() method calls. Refs: https://github.com/nodejs/node/pull/8294 Fixes: https://github.com/nodejs/node/issues/6190 Fixes: https://github.com/nodejs/node/issues/11685 PR-URL: https://github.com/nodejs/node/pull/13149 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>