mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
max_sockets honoured precisely
The internal log socket was subtracted from the number of available sockets. So, if max_sockets was set to 100, you could create only 99 sockets. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
5dcbc34396
commit
889424e675
@ -49,8 +49,8 @@ zmq::ctx_t::ctx_t (uint32_t io_threads_) :
|
||||
HIBYTE (wsa_data.wVersion) == 2);
|
||||
#endif
|
||||
|
||||
// Initialise the array of mailboxes.
|
||||
slot_count = max_sockets + io_threads_;
|
||||
// Initialise the array of mailboxes. +1 accounts for internal log socket.
|
||||
slot_count = max_sockets + io_threads_ + 1;
|
||||
slots = (mailbox_t**) malloc (sizeof (mailbox_t*) * slot_count);
|
||||
zmq_assert (slots);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user