Merge pull request #298 from pieterh/master

Fixed issue (unknown) on zmq_init(-1)
This commit is contained in:
Ian Barber 2012-03-28 23:35:04 -07:00
commit 3eaae8b21e

View File

@ -210,9 +210,13 @@ int zmq_ctx_get (void *ctx_, int option_)
void *zmq_init (int io_threads_)
{
void *ctx = zmq_ctx_new ();
zmq_ctx_set (ctx, ZMQ_IO_THREADS, io_threads_);
return ctx;
if (io_threads_ >= 0) {
void *ctx = zmq_ctx_new ();
zmq_ctx_set (ctx, ZMQ_IO_THREADS, io_threads_);
return ctx;
}
errno = EINVAL;
return NULL;
}
int zmq_term (void *ctx_)