Last active
August 29, 2015 14:11
-
-
Save briansorahan/e2001e0e427bf315e389 to your computer and use it in GitHub Desktop.
zmq crash when creating 118 sockets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i, | |
zmq = require('zmq'), | |
numSocks = 1000, | |
sockets = []; | |
console.log('MAX_SOCKETS=' + zmq.Context.getMaxSockets()); | |
console.log('creating sockets'); | |
for (i = 0; i < numSocks; i++) { | |
var sock = zmq.socket('dealer'); | |
sockets.push(sock); | |
process.stdout.write(i + ','); | |
}; | |
console.log(''); | |
console.log('done creating sockets'); | |
for (i = 0; i < numSocks; i++) { | |
sockets[i].close(); | |
}; | |
console.log('done closing sockets'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output is