Skip to content

Commit

Permalink
[fix] Only throw when in error state
Browse files Browse the repository at this point in the history
Fixes #19.
  • Loading branch information
mmalecki committed Feb 6, 2013
1 parent 3d3e091 commit b42ddbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/godot/net/server.js
Expand Up @@ -145,7 +145,9 @@ Server.prototype.listen = function (port, host, callback) {
return callback(err);
}

throw err;
if (err) {
throw err;
}
}
}

Expand Down Expand Up @@ -265,4 +267,4 @@ Server.prototype._onTcpSocket = function (socket) {
});

socket.pipe(parser);
};
};

0 comments on commit b42ddbf

Please sign in to comment.