-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: more test coverage for maxConnections #1855
Conversation
server.listen(common.PORT, function() { | ||
createConnection(0) | ||
.then(createConnection.bind(null, 1)) | ||
.then(function() {connections[0].end();}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: space between { }
Updated the branch to conform to the style comments from @brendanashworth. |
|
||
var server = net.createServer(function(socket) { | ||
socket.on('data', function(data) { | ||
console.error('received message: ' + data.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the data.toString
is unnecessary here
Thanks for adding this test, it was really bad that something like this was untested beforehand. |
Updated commit based on all comments from @brendanashworth |
.then(closeConnection.bind(null, 2)); | ||
}); | ||
|
||
process.on('exit', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: no space after function
, so function() {
Sorry I missed the little style nitpick. Other than that, this LGTM. edit: good use of promises btw 😄 |
If the server is not accepting connections because maxConnections is exceeded, the server should start accepting connections again when a connection closes.
OK, nit picked, new commit pushed! |
If the server is not accepting connections because maxConnections is exceeded, the server should start accepting connections again when a connection closes. PR-URL: #1855 Reviewed-By: Brendan Ashworth <[email protected]>
Thanks, landed in bd99e8d. |
If the server is not accepting connections because maxConnections is exceeded, the server should start accepting connections again when a connection closes. PR-URL: nodejs/node#1855 Reviewed-By: Brendan Ashworth <[email protected]>
If the server is not accepting connections because maxConnections
is exceeded, the server should start accepting connections again
when a connection closes.
Eliminates a
TODO
comment. ref: #264