aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-02 14:47:50 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-02 14:47:50 -0800
commit87b9fe11e545049173d9fb251c403dbd87786490 (patch)
tree6037e9f26bea759dd721ded848c80cc91cb582c7
parent4485acfbd300ccecd86e37a3d8fdb9c9ade5e541 (diff)
assert on socket fd size
-rw-r--r--src/library.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 75a8a90a..bc8ae5bd 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6801,6 +6801,7 @@ LibraryManager.library = {
socket__deps: ['$Sockets'],
socket: function(family, type, protocol) {
var fd = Sockets.nextFd++;
+ assert(fd < 64); // select() assumes socket fd values are in 0..63
Sockets.fds[fd] = {
connected: false
};