Skip to content

Commit

Permalink
src: remove old code
Browse files Browse the repository at this point in the history
The Socket writable only change was added and implemented in the
constructor around 5885f46, but this was never removed.

The libev counter issue is no longer prudent; the test remains in
test/sequential/test-regress-GH-1726.

PR-URL: nodejs/node#1819
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
brendanashworth authored and andrewdeandrade committed Jun 3, 2015
1 parent ac05d2b commit 38ec4a1
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,6 @@
var tty = NativeModule.require('tty');
stream = new tty.WriteStream(fd);
stream._type = 'tty';

// Hack to have stream not keep the event loop alive.
// See https://github.com/joyent/node/issues/1726
if (stream._handle && stream._handle.unref) {
stream._handle.unref();
}
break;

case 'FILE':
Expand All @@ -600,20 +594,7 @@
readable: false,
writable: true
});

// FIXME Should probably have an option in net.Socket to create a
// stream from an existing fd which is writable only. But for now
// we'll just add this hack and set the `readable` member to false.
// Test: ./node test/fixtures/echo.js < /etc/passwd
stream.readable = false;
stream.read = null;
stream._type = 'pipe';

// FIXME Hack to have stream not keep the event loop alive.
// See https://github.com/joyent/node/issues/1726
if (stream._handle && stream._handle.unref) {
stream._handle.unref();
}
break;

default:
Expand Down

0 comments on commit 38ec4a1

Please sign in to comment.