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:
Pieter Hintjens 2014-06-11 18:24:39 +02:00
parent 14afbf9b48
commit 39455c2114

View File

@ -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;