child_process: stop .disconnect() call if channel is diconnected

This commit is contained in:
Andreas Madsen 2012-02-07 21:10:11 +01:00 committed by isaacs
parent 02c1cb54aa
commit 9da830e895

View 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