nickdesaulniers/node-nanomsg — pull request #27 by tcr (2014-04-23 17:12:14+00:00)
Title: Trying to bind on a used port in Nanomsg will abort() the whole process.

This is a misfeature in nanomsg. The Node module and should provide the option to mitigate this issue:

https://github.com/nanomsg/nanomsg/issues/235

Since it requires changes to the nanomsg FSM I'll propose a workaround in Node for the short-term. An async function which checks for a port's availability, cleans up, and throws an `error` event or otherwise succeeds.

Obviously there is time enough for a race condition but this might mitigate the majority of common use.