Changeset View
Changeset View
Standalone View
Standalone View
src/zmq/zmqpublishnotifier.cpp
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | if (i == mapPublishNotifiers.end()) { | ||||
&outbound_message_high_water_mark, | &outbound_message_high_water_mark, | ||||
sizeof(outbound_message_high_water_mark)); | sizeof(outbound_message_high_water_mark)); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
zmqError("Failed to set outbound message high water mark"); | zmqError("Failed to set outbound message high water mark"); | ||||
zmq_close(psocket); | zmq_close(psocket); | ||||
return false; | return false; | ||||
} | } | ||||
const int so_keepalive_option{1}; | |||||
rc = zmq_setsockopt(psocket, ZMQ_TCP_KEEPALIVE, &so_keepalive_option, | |||||
sizeof(so_keepalive_option)); | |||||
if (rc != 0) { | |||||
zmqError("Failed to set SO_KEEPALIVE"); | |||||
zmq_close(psocket); | |||||
return false; | |||||
} | |||||
rc = zmq_bind(psocket, address.c_str()); | rc = zmq_bind(psocket, address.c_str()); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
zmqError("Failed to bind address"); | zmqError("Failed to bind address"); | ||||
zmq_close(psocket); | zmq_close(psocket); | ||||
return false; | return false; | ||||
} | } | ||||
// register this notifier for the address, so it can be reused for other | // register this notifier for the address, so it can be reused for other | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |