Problem: zmq_connect doesn't return EINVAL on invalid endpoint

Solution: set errno to EINVAL when tcp:// endpoint is invalid (was just
leaving errno to previous value).
This commit is contained in:
Pieter Hintjens 2014-06-25 12:48:26 +02:00
parent 2524e26893
commit ce8fbb26cb

View File

@ -619,6 +619,7 @@ int zmq::socket_base_t::connect (const char *addr_)
}
}
if (rc == -1) {
errno = EINVAL;
delete paddr;
return -1;
}