Skip to content

Commit

Permalink
Fixes #20 for real this time...
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla authored and andrewrk committed Jan 28, 2013
1 parent fd39844 commit efe2e7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Server.prototype.listen = function(port, host) {
self.socketServer = net.createServer();
self.socketServer.on('connection', function(socket) {
var client = new Client(true);
client._end = client.end;
client.end = function end(endReason) {
client.write(0xff, {reason: endReason});
client._end(endReason);
}
client.id = nextId++;
self.clients[client.id] = client;
client.on('error', function(err) {
Expand Down

0 comments on commit efe2e7f

Please sign in to comment.