Permalink
Browse files

:retab

Constant use of tab to indent.
  • Loading branch information...
1 parent d94b111 commit 40ead731cfd9363ff1505e9ed99b1aed4d70bc77 @4d47 4d47 committed Aug 31, 2011
Showing with 23 additions and 23 deletions.
  1. +23 −23 lib/multi-node.js
View
@@ -10,26 +10,26 @@ exports.listen = function(options, server){
var emitter = new process.EventEmitter();
if(process.env._CHILD_ID_){
emitter.id = process.env._CHILD_ID_;
- var stdin = new net.Stream(0, 'unix');
- var descriptorType;
- stdin.addListener('data', function(message){
- descriptorType = message;
- });
- var siblingIn;
- stdin.addListener('fd', function(fd){
- if(descriptorType == "tcp"){
- server.listenFD(fd, 'tcp4');
- }
- else if(descriptorType == "sibling"){
- var stream = new net.Stream(fd, "unix");
- emitter.emit("node", stream);
- stream.resume();
- }
- else{
- throw new Error("Unknown file descriptor " + descriptorType);
- }
- });
- stdin.resume();
+ var stdin = new net.Stream(0, 'unix');
+ var descriptorType;
+ stdin.addListener('data', function(message){
+ descriptorType = message;
+ });
+ var siblingIn;
+ stdin.addListener('fd', function(fd){
+ if(descriptorType == "tcp"){
+ server.listenFD(fd, 'tcp4');
+ }
+ else if(descriptorType == "sibling"){
+ var stream = new net.Stream(fd, "unix");
+ emitter.emit("node", stream);
+ stream.resume();
+ }
+ else{
+ throw new Error("Unknown file descriptor " + descriptorType);
+ }
+ });
+ stdin.resume();
}else{
isMaster = true;
emitter.id = "master";
@@ -71,9 +71,9 @@ exports.listen = function(options, server){
}
var masterChildConnection = netBinding.socketpair();
process.nextTick(function(){
- var stream = new net.Stream(masterChildConnection[0], "unix");
- emitter.emit("node", stream);
- stream.resume();
+ var stream = new net.Stream(masterChildConnection[0], "unix");
+ emitter.emit("node", stream);
+ stream.resume();
child.master.write("sibling", "ascii", masterChildConnection[1]);
});
})(child);

0 comments on commit 40ead73

Please sign in to comment.