Skip to content

Commit

Permalink
Revert "oops, stdin replaced by stdout"
Browse files Browse the repository at this point in the history
This reverts commit 6ad2475.
  • Loading branch information
olalonde committed Mar 31, 2011
1 parent 6ad2475 commit 46495b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ttychat.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var socket_path = "/tmp/ttychat.sock";
var socket = new net.Socket({type: 'unix'});

socket.on('data', function(data) {
process.stdout.write(data);
process.stdin.write(data);
});

socket.on('connect', function(data) {
Expand All @@ -21,11 +21,11 @@ socket.on('connect', function(data) {
});

socket.on('error', function(data) {
process.stdout.write("Server is offline.");
process.stdin.write("Server is offline.");
});

socket.on('end', function(data) {
process.stdout.write("Disconnected from server.");
process.stdin.write("Disconnected from server.");
process.exit();
});

Expand Down

0 comments on commit 46495b3

Please sign in to comment.