Permalink
Browse files

Revert "oops, stdin replaced by stdout"

This reverts commit 6ad2475.
  • Loading branch information...
1 parent 6ad2475 commit 46495b3292f9b3c3983fefdffe24609cab098513 @olalonde committed Mar 31, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 ttychat.js
View
@@ -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) {
@@ -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();
});

0 comments on commit 46495b3

Please sign in to comment.