Skip to content

Commit

Permalink
removed sys references
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed Sep 10, 2010
1 parent 56c2140 commit b52dca6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
5 changes: 3 additions & 2 deletions lib/debug-server.js
@@ -1,6 +1,5 @@
var http = require('http'),
events = require('events'),
sys = require('sys'),
path = require('path'),
ws = require('../vendor/ws'),
paperboy = require('../vendor/paperboy'),
Expand Down Expand Up @@ -65,9 +64,11 @@ exports.createServer = function(options) {
}
srv.emit('close');
}
},
webPort: {
get: function () { return settings.webPort; }
}
});
srv.__defineGetter__('webPort', function () { return settings.webPort; });

return srv;
};
15 changes: 5 additions & 10 deletions lib/debugger.js
@@ -1,6 +1,5 @@
var net = require('net'),
events = require('events'),
sys = require('sys');
events = require('events');

function makeMessage() {
return {
Expand Down Expand Up @@ -51,7 +50,7 @@ exports.attachDebugger = function (port) {
msg.contentLength = parseInt(m[1], 10);
}
else {
sys.debug('no Content-Length');
console.warn('no Content-Length');
}
buffer = buffer.slice(offset + 4);
parse();
Expand All @@ -73,11 +72,12 @@ exports.attachDebugger = function (port) {
{
conn.end();
}
},
connected: {
get: function() { return connected; }
}
});

debugr.__defineGetter__('connected', function () { return connected; });

conn.on('connect', function () {
connected = true;
debugr.emit('connect');
Expand All @@ -104,8 +104,3 @@ exports.attachDebugger = function (port) {
return debugr;
};

exports.startProcess = function (cmd) {

};


14 changes: 1 addition & 13 deletions lib/session.js
@@ -1,17 +1,8 @@
var http = require('http'),
events = require('events'),
sys = require('sys'),
path = require('path'),
debugr = require('./debugger');

function override(options, defaults) {
var result = {};
Object.keys(defaults).forEach(function (key) {
result[key] = options[key] || defaults[key];
});
return result;
}

///////////////////////////////////////////////////////////
// exports

Expand Down Expand Up @@ -126,10 +117,7 @@ exports.createSession = function () {
value: function (conn) {
clients = clients.filter(function(c) { return c !== conn; });
if (clients.length < 1) {
if (debug) {
debug.close();
}
session.emit('close');
session.close();
}
}
}
Expand Down

0 comments on commit b52dca6

Please sign in to comment.