child_process: stop .disconnect() call if channel is diconnected
authorAndreas Madsen <amwebdk@gmail.com>
Tue, 7 Feb 2012 20:10:11 +0000 (21:10 +0100)
committerisaacs <i@izs.me>
Wed, 8 Feb 2012 19:42:38 +0000 (11:42 -0800)
lib/child_process.js

index 9c1193daa2f46f733ce1d194a9f5504b6286b753..4b5cbbe6739e9ab505782ad010643d588855bc00 100644 (file)
@@ -142,6 +142,7 @@ function setupChannel(target, channel) {
   target.disconnect = function() {
       if (!this.connected) {
         this.emit('error', new Error('IPC channel is already disconnected'));
+        return;
       }
 
       // do not allow messages to be written