title: Socket is busy when connecting before bind
body: <p>I'm using <a href="http://www.zeromq.org" rel="nofollow">zeromq</a> to push messages from node.js server to my worker. I create a <code>router</code> socket on the node.js side</p>
  
  <pre><code>var sender = zmq.socket('router');
  sender.bind('tcp://127.0.0.1:6633', function(err) {
    if (err) {
      console.log( 'Error binding socket' );
      return;
    }
    console.log('OK!');
  }
  </code></pre>
  
  <p>and connect to this address with a <code>dealer</code> in the worker code. </p>
  
  <p>The problem occurs when the worker connects first, before bind (not always, but very often). This should not be a problem regarding the zeromq documentation, so I think it's a problem in the <a href="https://github.com/JustinTulloss/zeromq.node" rel="nofollow">node.js binding</a>, the question is how can I solve this? </p>
  
  <p>Also a problem that I can catch this exception <code>Socket is busy</code> in <code>process.on('uncaughtException',...)</code>, not in the <code>bind</code> function</p>
  
  <p>I should mention that I'm doing this on windows 7 64bit.</p>