Skip to content

Commit 9334260

Browse files
committed
reconnect field init
1 parent 9da4979 commit 9334260

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/internal/sio_client_impl.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,32 @@ using boost::posix_time::milliseconds;
2222
namespace sio
2323
{
2424
client_impl::client_impl() :
25-
m_con_state(con_closed),
26-
m_ping_interval(0),
27-
m_ping_timeout(0),
28-
m_network_thread()
25+
m_con_state(con_closed),
26+
m_ping_interval(0),
27+
m_ping_timeout(0),
28+
m_network_thread(),
29+
m_reconn_attempts(0xFFFFFFFF),
30+
m_reconn_delay(5000),
31+
m_reconn_delay_max(25000)
2932
{
3033
using websocketpp::log::alevel;
31-
#ifndef DEBUG
34+
#ifndef DEBUG
3235
m_client.clear_access_channels(alevel::all);
3336
m_client.set_access_channels(alevel::connect|alevel::disconnect|alevel::app);
34-
#endif
37+
#endif
3538
// Initialize the Asio transport policy
3639
m_client.init_asio();
37-
40+
3841
// Bind the clients we are using
3942
using websocketpp::lib::placeholders::_1;
4043
using websocketpp::lib::placeholders::_2;
4144
m_client.set_open_handler(lib::bind(&client_impl::on_open,this,_1));
4245
m_client.set_close_handler(lib::bind(&client_impl::on_close,this,_1));
4346
m_client.set_fail_handler(lib::bind(&client_impl::on_fail,this,_1));
4447
m_client.set_message_handler(lib::bind(&client_impl::on_message,this,_1,_2));
45-
48+
4649
m_packet_mgr.set_decode_callback(lib::bind(&client_impl::on_decode,this,_1));
47-
50+
4851
m_packet_mgr.set_encode_callback(lib::bind(&client_impl::on_encode,this,_1,_2));
4952
}
5053

0 commit comments

Comments
 (0)