diff --git a/libskale/broadcaster.cpp b/libskale/broadcaster.cpp index ee625536d..20d15b232 100644 --- a/libskale/broadcaster.cpp +++ b/libskale/broadcaster.cpp @@ -90,9 +90,17 @@ void* ZmqBroadcaster::server_socket() const { if ( !m_zmq_server_socket ) { m_zmq_server_socket = zmq_socket( m_zmq_context, ZMQ_PUB ); - int val = 16; + int val = 15000; + zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_IVL, &val, sizeof( val ) ); + val = 3000; + zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TIMEOUT, &val, sizeof( val ) ); + val = 60000; + zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TTL, &val, sizeof( val ) ); + + val = 16; zmq_setsockopt( m_zmq_server_socket, ZMQ_SNDHWM, &val, sizeof( val ) ); + const dev::eth::ChainParams& ch = m_client.chainParams(); // connect server to clients @@ -116,11 +124,11 @@ void* ZmqBroadcaster::client_socket() const { int value = 1; zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE, &value, sizeof( value ) ); - value = 15; + value = 300; zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_IDLE, &value, sizeof( value ) ); value = 10; zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_CNT, &value, sizeof( value ) ); - value = 15; + value = 300; zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_INTVL, &value, sizeof( value ) ); value = 16;