child_process_uv: fix test-child-process-stdin and -ipc

This commit is contained in:
Ryan Dahl
2011-08-01 15:40:44 -07:00
parent 707b1dee84
commit e3ac47771c
2 changed files with 4 additions and 1 deletions

View File

@@ -239,6 +239,8 @@ UVTEST += simple/test-child-process-buffering
UVTEST += simple/test-child-process-exec-cwd
UVTEST += simple/test-child-process-cwd
UVTEST += simple/test-child-process-env
UVTEST += simple/test-child-process-stdin
UVTEST += simple/test-child-process-ipc
test-uv: all

View File

@@ -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 {
}