diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-08-02 02:40:44 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-02 02:40:44 +0400 |
commit | e3ac47771c3408313223f34046891776834a000b (patch) | |
tree | f02373173ab3038e84233adb08af3221357ac2c4 /lib | |
parent | 707b1dee84685c0c17530d568192455cdf790078 (diff) |
child_process_uv: fix test-child-process-stdin and -ipc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net_uv.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/net_uv.js b/lib/net_uv.js index a8c339c248b..193646e41ae 100644 --- a/lib/net_uv.js +++ b/lib/net_uv.js @@ -191,13 +191,14 @@ function afterShutdown(status, handle, req) { var self = handle.socket; assert.ok(self._flags & FLAG_SHUTDOWN); + assert.ok(!self.writable); // callback may come after call to destroy. if (self.destroyed) { return; } - if (self._flags & FLAG_GOT_EOF) { + if (self._flags & FLAG_GOT_EOF || !self.readable) { self.destroy(); } else { } |