diff --git a/src/xclient_zmq_impl.cpp b/src/xclient_zmq_impl.cpp index 269c0ac..896defb 100644 --- a/src/xclient_zmq_impl.cpp +++ b/src/xclient_zmq_impl.cpp @@ -15,6 +15,11 @@ namespace xeus { + namespace + { + constexpr std::size_t max_retry = 3; + constexpr long heartbeat_timeout = std::chrono::milliseconds(90).count(); + } xclient_zmq_impl::xclient_zmq_impl(zmq::context_t& context, const xeus::xconfiguration& config, @@ -23,7 +28,7 @@ namespace xeus , m_shell_client(context, config.m_transport, config.m_ip, config.m_shell_port) , m_control_client(context, config.m_transport, config.m_ip, config.m_control_port) , m_iopub_client(context, config) - , m_heartbeat_client(context, config, m_max_retry, m_heartbeat_timeout) + , m_heartbeat_client(context, config, max_retry, heartbeat_timeout) , p_messenger(context) , m_error_handler(eh) { @@ -195,4 +200,4 @@ namespace xeus return xzmq_serializer::deserialize(wire_msg, *p_auth); } -} \ No newline at end of file +} diff --git a/src/xclient_zmq_impl.hpp b/src/xclient_zmq_impl.hpp index 9854de5..b52aa80 100644 --- a/src/xclient_zmq_impl.hpp +++ b/src/xclient_zmq_impl.hpp @@ -93,9 +93,6 @@ namespace xeus xiopub_client m_iopub_client; xheartbeat_client m_heartbeat_client; - const std::size_t m_max_retry = 3; - const long m_heartbeat_timeout = std::chrono::milliseconds(90).count(); - xclient_messenger p_messenger; nl::json::error_handler_t m_error_handler; @@ -112,4 +109,4 @@ namespace xeus }; } -#endif \ No newline at end of file +#endif