Open Panakotta00 opened 6 years ago
sounds similar to issue #65 When was the last time you updated the library?
yesterday ;-)
but I don't think that this is something like that.
Oh... I see... there is no handler for something like this in the init of the websocketpp client class.
// sleepy_discord/websocketpp_websocket.cpp L.114
void WebsocketppDiscordClient::onClose(_client * client, websocketpp::connection_hdl handle) {
}
I think the must be one that trys a reconnection... and if that doesn't work, it must wait for 5 seconds.
I'm right now doing a cherry pick commit for https://github.com/yourWaifu/sleepy-discord/commit/d02c9bc96266d6b91c98774d1b4571e0ab8d4dbb
Oh great... but the question is... if it has a bad connection... does it retry a connection and reconnects?
I have no idea of that... but I am interested :-D
After failing to send a packet. The library will wait for an acknowledgement from Discord that we sent the packet. If there's no acknowledgement, then the library we try to reconnect.
Ahhh... ok... but after reconnect my bot or the lib has no idea from the failed send call. An option is to return a boolean if it works or not. But thank you for everything, and I will run an test over night ;-)
Well if your issue is the same as #65, then it's crashing because of an uncaught throw.
report back to me your results so that I can mark this closed if fixed
so it runs now for over 24h without crash... I think this is fixed... thank you ^^
Ok nope... sorry... now I got the same error again...
I think this and #75 is related.
I don't that they are very similar besides that's it's coming from the same library.
I'm going to guess that the error is acurring at a different spot now. I don't know where it would happen in the code, so a call stack during the crash would help.
Well both our issues are I uncaught exceptions after disconnect.
Now I have let run the Bot for a while (about 14h) and then it Crashes with this exception
the router is reconnecting every night
It could be an exception after a disconnect, but we can't really know for sure yet. That's why I would like a call stack since that'll tell if the exception is actually happening after a disconnect.
I try to get the call stack, but it is a little bit complicated to run remote debugging over such a long time ^^ When I have the stack I will come back.
Every time I try and get the call stack it throws the exception in main.cpp and doesn't tell me where it originates from other than client.run().
Well I've tested it now with gdb.
After the crash I have this Backtrace... or do you need other things?
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6395231 in __GI_abort () at abort.c:79
#2 0x00007ffff6d540ad in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff6d52066 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff6d520b1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff6d522c9 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00005555555b367f in websocketpp::endpoint<websocketpp::connection<websocketpp::config::asio_tls_client>, websocketpp::config::asio_tls_client>::close(std::weak_ptr<void>, unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#7 0x0000555555598cfc in SleepyDiscord::WebsocketppDiscordClient::disconnect(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#8 0x000055555557071d in SleepyDiscord::BaseDiscordClient::disconnectWebsocket(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#9 0x00005555555705b8 in SleepyDiscord::BaseDiscordClient::reconnect(unsigned int) ()
#10 0x0000555555571634 in SleepyDiscord::BaseDiscordClient::heartbeat() ()
#11 0x00005555555784d6 in void std::__invoke_impl<void, void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&>(std::__invoke_memfun_deref, void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&) ()
#12 0x00005555555780c6 in std::result_of<void (SleepyDiscord::BaseDiscordClient::* const&(SleepyDiscord::BaseDiscordClient*&))()>::type std::__invoke<void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&>(void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&) ()
#13 0x0000555555577b30 in decltype (__invoke((*this)._M_pmf, (forward<SleepyDiscord::BaseDiscordClient*&>)({parm#1}))) std::_Mem_fn_base<void (SleepyDiscord::BaseDiscordClient::*)(), true>::operator()<SleepyDiscord::BaseDiscordClient*&>(SleepyDiscord::BaseDiscordClient*&) const ()
#14 0x0000555555576f4a in void std::_Bind<std::_Mem_fn<void (SleepyDiscord::BaseDiscordClient::*)()> (SleepyDiscord::BaseDiscordClient*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) ()
#15 0x0000555555575a56 in void std::_Bind<std::_Mem_fn<void (SleepyDiscord::BaseDiscordClient::*)()> (SleepyDiscord::BaseDiscordClient*)>::operator()<, void>() ()
#16 0x0000555555574905 in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (SleepyDiscord::BaseDiscordClient::*)()> (SleepyDiscord::BaseDiscordClient*)> >::_M_invoke(std::_Any_data const&) ()
#17 0x0000555555573128 in std::function<void ()>::operator()() const ()
#18 0x0000555555598851 in SleepyDiscord::handleTimers(std::error_code const&, std::function<void ()>&) ()
#19 0x00005555555c8e25 in void std::_Bind<void (*(std::_Placeholder<1>, std::function<void ()>))(std::error_code const&, std::function<void ()>&)>::__call<void, std::error_code const&, 0ul, 1ul>(std::tuple<std::error_code const&>&&, std::_Index_tuple<0ul, 1ul>) ()
#20 0x00005555555c137d in void std::_Bind<void (*(std::_Placeholder<1>, std::function<void ()>))(std::error_code const&, std::function<void ()>&)>::operator()<std::error_code const&, void>(std::error_code const&) ()
#21 0x00005555555b887c in std::_Function_handler<void (std::error_code const&), std::_Bind<void (*(std::_Placeholder<1>, std::function<void ()>))(std::error_code const&, std::function<void ()>&)> >::_M_invoke(std::_Any_data const&, std::error_code const&) ()
#22 0x00005555555b0b75 in std::function<void (std::error_code const&)>::operator()(std::error_code const&) const ()
#23 0x00005555555b8ba2 in websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::handle_timer(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&) ()
#24 0x00005555555ee908 in void std::__invoke_impl<void, void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&>(std::__invoke_memfun_deref, void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&) ()
#25 0x00005555555e6a0d in std::result_of<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&(websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&))(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)>::type std::__invoke<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&>(void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&) ()
#26 0x00005555555dced0 in decltype (__invoke((*this)._M_pmf, (forward<websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&>)({parm#1}), (forward<std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&>)({parm#1}), (forward<std::function<void (std::error_code const&)>&>)({parm#1}), (forward<std::error_code const&>)({parm#1}))) std::_Mem_fn_base<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), true>::operator()<websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, as io::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&>(websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&) const ()
#27 0x00005555555d5168 in void std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>::__call<void, std::error_code const&, 0ul, 1ul, 2ul, 3ul>(std::tuple<std::error_code const&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) ()
#28 0x00005555555cda2b in void std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>::operator()<std::error_code const&, void>(std::error_code const&) ()
#29 0x00005555555f217d in asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>::operator()() ()
#30 0x00005555555eb55a in void asio::asio_handler_invoke<asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code> >(asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>&, ...) ()
#31 0x00005555555e2722 in void asio_handler_invoke_helpers::invoke<asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>, std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)> >(asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>&, std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>&) ()
#32 0x00005555555d94f2 in asio::detail::wait_handler<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)> >::do_complete(asio::detail::task_io_service*, asio::detail::task_io_service_operation*, std::error_code const&, unsigned long) ()
#33 0x00005555555a2a2a in asio::detail::task_io_service_operation::complete(asio::detail::task_io_service&, std::error_code const&, unsigned long) ()
#34 0x00005555555a54ca in asio::detail::task_io_service::do_run_one(asio::detail::scoped_lock<asio::detail::posix_mutex>&, asio::detail::task_io_service_thread_info&, std::error_code const&) ()
#35 0x00005555555a4efe in asio::detail::task_io_service::run(std::error_code&) ()
#36 0x00005555555a57b7 in asio::io_service::run() ()
#37 0x00005555555b2d11 in websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::run() ()
#38 0x000055555559880a in SleepyDiscord::WebsocketppDiscordClient::run() ()
#39 0x00005555555655f2 in main () at /home/massivebytes/MassiveBot/Main.cpp:155
Perfect, it looks like the library detected a bad connection and tried to reconnect but failed to disconnect because websocketpp also detected a bad connection and throw an exception.
Ok and how I can let it reconnect so long, to that time where it can connect again?
I'm going to guess the same way as that temporary solution in d02c9bc. However, this time for the disconnect or on close function.
So you mean I can try to create a try-catch handler around my "run()"... but with what function can I return to the Connection? Again only with "run()"?
Not exactly, but kind of like that. You could do a catch at run but then you'll have to write the code for reconnecting. However, I was thinking of something like d02c9bc but for websocketpp's close function.
workes for some time but, now I get that error:
terminate called after throwing an instance of 'websocketpp::exception'
what(): Invalid close code used
Thread 1 "MassiveBot.out" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
And with this backtrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6395231 in __GI_abort () at abort.c:79
#2 0x00007ffff6d540ad in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff6d52066 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff6d520b1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff6d522c9 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x0000555555598dfc in SleepyDiscord::WebsocketppDiscordClient::disconnect(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#7 0x0000555555570771 in SleepyDiscord::BaseDiscordClient::disconnectWebsocket(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#8 0x000055555557060c in SleepyDiscord::BaseDiscordClient::reconnect(unsigned int) ()
#9 0x0000555555571688 in SleepyDiscord::BaseDiscordClient::heartbeat() ()
#10 0x000055555557852a in void std::__invoke_impl<void, void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&>(std::__invoke_memfun_deref, void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&) ()
#11 0x000055555557811a in std::result_of<void (SleepyDiscord::BaseDiscordClient::* const&(SleepyDiscord::BaseDiscordClient*&))()>::type std::__invoke<void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&>(void (SleepyDiscord::BaseDiscordClient::* const&)(), SleepyDiscord::BaseDiscordClient*&) ()
#12 0x0000555555577b84 in decltype (__invoke((*this)._M_pmf, (forward<SleepyDiscord::BaseDiscordClient*&>)({parm#1}))) std::_Mem_fn_base<void (SleepyDiscord::BaseDiscordClient::*)(), true>::operator()<SleepyDiscord::BaseDiscordClient*&>(SleepyDiscord::BaseDiscordClient*&) const ()
#13 0x0000555555576f9e in void std::_Bind<std::_Mem_fn<void (SleepyDiscord::BaseDiscordClient::*)()> (SleepyDiscord::BaseDiscordClient*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) ()
#14 0x0000555555575aaa in void std::_Bind<std::_Mem_fn<void (SleepyDiscord::BaseDiscordClient::*)()> (SleepyDiscord::BaseDiscordClient*)>::operator()<, void>() ()
#15 0x0000555555574959 in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (SleepyDiscord::BaseDiscordClient::*)()> (SleepyDiscord::BaseDiscordClient*)> >::_M_invoke(std::_Any_data const&) ()
#16 0x000055555557317c in std::function<void ()>::operator()() const ()
#17 0x00005555555988a5 in SleepyDiscord::handleTimers(std::error_code const&, std::function<void ()>&) ()
#18 0x00005555555c960b in void std::_Bind<void (*(std::_Placeholder<1>, std::function<void ()>))(std::error_code const&, std::function<void ()>&)>::__call<void, std::error_code const&, 0ul, 1ul>(std::tuple<std::error_code const&>&&, std::_Index_tuple<0ul, 1ul>) ()
#19 0x00005555555c1531 in void std::_Bind<void (*(std::_Placeholder<1>, std::function<void ()>))(std::error_code const&, std::function<void ()>&)>::operator()<std::error_code const&, void>(std::error_code const&) ()
#20 0x00005555555b897e in std::_Function_handler<void (std::error_code const&), std::_Bind<void (*(std::_Placeholder<1>, std::function<void ()>))(std::error_code const&, std::function<void ()>&)> >::_M_invoke(std::_Any_data const&, std::error_code const&) ()
#21 0x00005555555b0c7f in std::function<void (std::error_code const&)>::operator()(std::error_code const&) const ()
#22 0x00005555555b8ca4 in websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::handle_timer(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&) ()
#23 0x00005555555ee948 in void std::__invoke_impl<void, void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&>(std::__invoke_memfun_deref, void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&) ()
#24 0x00005555555e6a4d in std::result_of<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&(websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&))(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)>::type std::__invoke<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&>(void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::* const&)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&) ()
#25 0x00005555555dcf10 in decltype (__invoke((*this)._M_pmf, (forward<websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&>)({parm#1}), (forward<std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&>)({parm#1}), (forward<std::function<void (std::error_code const&)>&>)({parm#1}), (forward<std::error_code const&>)({parm#1}))) std::_Mem_fn_base<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&), true>::operator()<websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&>(websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*&, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, as io::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >&, std::function<void (std::error_code const&)>&, std::error_code const&) const ()
#26 0x00005555555d51a8 in void std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>::__call<void, std::error_code const&, 0ul, 1ul, 2ul, 3ul>(std::tuple<std::error_code const&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) ()
#27 0x00005555555cdbd1 in void std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>::operator()<std::error_code const&, void>(std::error_code const&) ()
#28 0x00005555555f21bd in asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>::operator()() ()
#29 0x00005555555eb59a in void asio::asio_handler_invoke<asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code> >(asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>&, ...) ()
#30 0x00005555555e2762 in void asio_handler_invoke_helpers::invoke<asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>, std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)> >(asio::detail::binder1<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>, std::error_code>&, std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)>&) ()
#31 0x00005555555d9532 in asio::detail::wait_handler<std::_Bind<std::_Mem_fn<void (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::*)(std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::error_code const&)> (websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>*, std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock>, asio::waitable_timer_service<std::chrono::_V2::steady_clock, asio::wait_traits<std::chrono::_V2::steady_clock> > > >, std::function<void (std::error_code const&)>, std::_Placeholder<1>)> >::do_complete(asio::detail::task_io_service*, asio::detail::task_io_service_operation*, std::error_code const&, unsigned long) ()
#32 0x00005555555a2b34 in asio::detail::task_io_service_operation::complete(asio::detail::task_io_service&, std::error_code const&, unsigned long) ()
#33 0x00005555555a55d4 in asio::detail::task_io_service::do_run_one(asio::detail::scoped_lock<asio::detail::posix_mutex>&, asio::detail::task_io_service_thread_info&, std::error_code const&) ()
#34 0x00005555555a5008 in asio::detail::task_io_service::run(std::error_code&) ()
#35 0x00005555555a58c1 in asio::io_service::run() ()
#36 0x00005555555b2e1b in websocketpp::transport::asio::endpoint<websocketpp::config::asio_tls_client::transport_config>::run() ()
#37 0x000055555559885e in SleepyDiscord::WebsocketppDiscordClient::run() ()
#38 0x0000555555565646 in main () at /home/massivebytes/MassiveBot/Main.cpp:159
And I have edited close so that it ignores bad_connection.
hmm, maybe change the 1006 here to something like maybe 1002 (According to Discord, you have to send a "non-1000 code"). https://github.com/yourWaifu/sleepy-discord/blob/develop/sleepy_discord/client.cpp#L481
Sorry I did this a while ago but got sidetracked. Anyway, does this fix the issue?
I have compiled the Lib for Debian/Linux, but I needed some tweaks. I have removed the dep include files for asio and wepsocketpp and have added the newest includes from Debian/Linux, without I wasn't able to compile the library.
Now I have let run the Bot for a while (about 14h) and then it Crashes with this exception:
Have you tweaked websocketpp?
I must say that the router is reconnecting every night, that means there is no internet for about 2min.