mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 00:46:05 +01:00
Merge pull request #1090 from hintjens/master
Problem: zmq_ctx_get (ZMQ_MAX_SOCKETS) returns gibberish
This commit is contained in:
commit
1d236d81c8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user