Commit 39455c21 authored by Pieter Hintjens's avatar Pieter Hintjens

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.
parent 14afbf9b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment