From bb81b1e3d9b10e49e00eb32bf31b80611dce70f6 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Fri, 31 Jan 2014 12:02:42 +0100 Subject: [PATCH] Fixed issue #865 - validation on ZMQ_TCP_KEEPALIVE --- src/options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options.cpp b/src/options.cpp index c04b0f9f..3db9e56a 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -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; }