title: Error: IPC channel is already disconnected
body: <p>Where/when should I catch this error?</p>
  
  <pre><code>Error: IPC channel is already disconnected
  </code></pre>
  
  <p>This is called from <code>child_process</code> (using <code>cluster</code>) module when I call <code>.disconect()</code> multiple times. I know that I shouldn't call this twice (or more), but sometimes I don't have control over this. Eventually how to prevent calling this multiple times? This code doesn't works:</p>
  
  <pre><code>try {
    if (worker.state !== "disconnected" &amp;&amp; worker.state !== "dead") {
      worker.disconnect();
    }
  } catch (error) {}
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This is stack trace of this error:</p>
  
  <pre><code>events.js:71
      throw arguments[1]; // Unhandled 'error' event
                     ^
  Error: IPC channel is already disconnected
      at process.target.disconnect (child_process.js:392:26)
      at ProgressTracker.callback (cluster.js:437:20)
      at ProgressTracker.check (cluster.js:94:32)
      at Object.Worker.disconnect [as 44:2] (cluster.js:445:16)
      at handleResponse (cluster.js:149:41)
      at respond (cluster.js:170:5)
      at handleMessage (cluster.js:180:5)
      at process.EventEmitter.emit (events.js:126:20)
      at handleMessage (child_process.js:269:12)
      at Pipe.channel.onread (child_process.js:293:9)
  </code></pre>