From e44a1b7cf016f281d66b9e5b8b84d23c9c5baa37 Mon Sep 17 00:00:00 2001 From: DmytroNazarenko Date: Fri, 22 Nov 2024 12:45:19 +0000 Subject: [PATCH] Revert "Merge pull request #1948 from skalenetwork/bug/IS-552-zmq-assert" This reverts commit 39b6d8edd30c7011a427275c093e182c1f0c204d, reversing changes made to a21e9ad2e4ec00d5fe27a55ba63f32a639fdf80c. --- libskale/broadcaster.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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;