Skip to content
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

maxConnections value is not respected #23

Open
scriptjs opened this issue Apr 24, 2017 · 0 comments
Open

maxConnections value is not respected #23

scriptjs opened this issue Apr 24, 2017 · 0 comments

Comments

@scriptjs
Copy link

The maximum number of connects is allowed to grow beyond the value of maxConnections. I committed the updated example.js to illustrate. The output is below:

$ node example.js
connections length: 4
2 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer b2 e8 19 85 61 af 1d a3 75 ad ad a8 6c ed bd 11 2e 44 bb bf 32 f2 c6 fe f0 0c 82 79 51 08 04 80>,
  host: '192.168.0.4',
  port: 10001,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 1
3 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer b2 e8 19 85 61 af 1d a3 75 ad ad a8 6c ed bd 11 2e 44 bb bf 32 f2 c6 fe f0 0c 82 79 51 08 04 80>,
  host: '192.168.0.4',
  port: 10001,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 2
3 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer 27 08 85 5a d8 55 35 f2 98 87 38 43 1f f7 9b 97 69 35 72 d2 f1 1c 33 0c be 0c 9c ca 3f 08 aa 4c>,
  host: '192.168.0.4',
  port: 10002,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 1
4 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer b2 e8 19 85 61 af 1d a3 75 ad ad a8 6c ed bd 11 2e 44 bb bf 32 f2 c6 fe f0 0c 82 79 51 08 04 80>,
  host: '192.168.0.4',
  port: 10001,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 2
4 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer 27 08 85 5a d8 55 35 f2 98 87 38 43 1f f7 9b 97 69 35 72 d2 f1 1c 33 0c be 0c 9c ca 3f 08 aa 4c>,
  host: '192.168.0.4',
  port: 10002,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 1
5 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer b2 e8 19 85 61 af 1d a3 75 ad ad a8 6c ed bd 11 2e 44 bb bf 32 f2 c6 fe f0 0c 82 79 51 08 04 80>,
  host: '192.168.0.4',
  port: 10001,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 2
5 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer 27 08 85 5a d8 55 35 f2 98 87 38 43 1f f7 9b 97 69 35 72 d2 f1 1c 33 0c be 0c 9c ca 3f 08 aa 4c>,
  host: '192.168.0.4',
  port: 10002,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 4
1 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 27 08 85 5a d8 55 35 f2 98 87 38 43 1f f7 9b 97 69 35 72 d2 f1 1c 33 0c be 0c 9c ca 3f 08 aa 4c>,
  host: null,
  port: 0,
  channel: null }
connections length: 4
1 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 5d 48 fb 52 49 f0 02 2e 0c c8 86 08 ec da fe 0b 05 05 8f 84 51 f7 7b 47 25 51 27 35 fb f9 11 c4>,
  host: null,
  port: 0,
  channel: null }
connections length: 4
1 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 73 c4 a8 65 81 5e 42 ad 19 ea bd 39 bd 8c b6 08 8b 0b 22 ca 8e a4 0a 43 aa a7 62 8f 05 4d 67 c6>,
  host: null,
  port: 0,
  channel: null }
connections length: 4
1 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 26 0f e5 04 b8 ea 5b 0b c8 dc fb 39 d9 e9 f6 23 5e 7e a7 85 43 5f b2 92 8f b2 44 9e 5c d8 e7 d9>,
  host: null,
  port: 0,
  channel: null }
connections length: 4
2 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 5d 48 fb 52 49 f0 02 2e 0c c8 86 08 ec da fe 0b 05 05 8f 84 51 f7 7b 47 25 51 27 35 fb f9 11 c4>,
  host: null,
  port: 0,
  channel: null }
connections length: 4
2 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 73 c4 a8 65 81 5e 42 ad 19 ea bd 39 bd 8c b6 08 8b 0b 22 ca 8e a4 0a 43 aa a7 62 8f 05 4d 67 c6>,
  host: null,
  port: 0,
  channel: null }
connections length: 4
2 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 26 0f e5 04 b8 ea 5b 0b c8 dc fb 39 d9 e9 f6 23 5e 7e a7 85 43 5f b2 92 8f b2 44 9e 5c d8 e7 d9>,
  host: null,
  port: 0,
  channel: null }
connections length: 5
2 'connect' { type: 'tcp',
  initiator: true,
  id: <Buffer 5d 48 fb 52 49 f0 02 2e 0c c8 86 08 ec da fe 0b 05 05 8f 84 51 f7 7b 47 25 51 27 35 fb f9 11 c4>,
  host: '192.168.0.4',
  port: 10003,
  channel: <Buffer 63 68 61 6e 6e 65 6c> }
connections length: 2
3 'connect' { type: 'tcp',
  initiator: false,
  id: <Buffer 27 08 85 5a d8 55 35 f2 98 87 38 43 1f f7 9b 97 69 35 72 d2 f1 1c 33 0c be 0c 9c ca 3f 08 aa 4c>,
  host: null,
  port: 0,
  channel: null }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant