Skip to content

Commit

Permalink
Fixed uninitialized values used in client
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Apr 11, 2024
1 parent b33fd19 commit a05eaf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/xclient_zmq_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
{
Expand Down Expand Up @@ -195,4 +200,4 @@ namespace xeus
return xzmq_serializer::deserialize(wire_msg, *p_auth);
}

}
}
5 changes: 1 addition & 4 deletions src/xclient_zmq_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -112,4 +109,4 @@ namespace xeus
};
}

#endif
#endif

0 comments on commit a05eaf5

Please sign in to comment.