Commit 1d236d81 authored by Richard Newton's avatar Richard Newton

Merge pull request #1090 from hintjens/master

Problem: zmq_ctx_get (ZMQ_MAX_SOCKETS) returns gibberish
parents 373d6884 188f7864
......@@ -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;
......
......@@ -34,8 +34,7 @@ int main (void)
assert (zmq_ctx_get (ctx, ZMQ_SOCKET_LIMIT) == ZMQ_MAX_SOCKETS_DFLT);
#elif defined(ZMQ_USE_POLL) || defined(ZMQ_USE_EPOLL) \
|| defined(ZMQ_USE_DEVPOLL) || defined(ZMQ_USE_KQUEUE)
assert (zmq_ctx_get (ctx, ZMQ_SOCKET_LIMIT)
== std::numeric_limits<int>::max());
assert (zmq_ctx_get (ctx, ZMQ_SOCKET_LIMIT) == 65535);
#endif
assert (zmq_ctx_get (ctx, ZMQ_IO_THREADS) == ZMQ_IO_THREADS_DFLT);
assert (zmq_ctx_get (ctx, ZMQ_IPV6) == 0);
......
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