mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-20 22:31:34 +01:00
Problem: zmq_ctx_get (ZMQ_MAX_SOCKETS) returns gibberish
Well, not gibberish, but 2^31 on Linux, which is useless. The code should probably use getrlimit on Linux and other calls depending on the system. For now I've set the ceiling at 64K.
This commit is contained in:
parent
14afbf9b48
commit
39455c2114
@ -208,7 +208,7 @@ int zmq::ctx_t::get (int option_)
|
||||
rc = max_sockets;
|
||||
else
|
||||
if (option_ == ZMQ_SOCKET_LIMIT)
|
||||
rc = clipped_maxsocket (std::numeric_limits<int>::max());
|
||||
rc = clipped_maxsocket (65535);
|
||||
else
|
||||
if (option_ == ZMQ_IO_THREADS)
|
||||
rc = io_thread_count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user