Fixed issue #865 - validation on ZMQ_TCP_KEEPALIVE

This commit is contained in:
Pieter Hintjens 2014-01-31 12:02:42 +01:00
parent 046e37e907
commit bb81b1e3d9

View File

@ -206,7 +206,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
break;
case ZMQ_TCP_KEEPALIVE:
if (is_int && (value >= -1 || value <= 1)) {
if (is_int && (value == -1 || value == 0 || value == 1)) {
tcp_keepalive = value;
return 0;
}