Asio unhandled exception

Hello, I created a server single thread async (linux) and clinet (win). Every time client is close while server is writing to the socket connected to this client exception appears: terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error>>' what(): Transport endpoint is not connected Aborted and server is terminated. I dont know why this exception is unhandled. int main( int argc, char** argv ) { try { boost::asio::io_service io_service; quotation_server server( io_service ); while ( true ) { try { io_service.run(); } catch( ... ){} } } catch ( std::exception& e ) { LOG << e.what() << std::endl; } catch( ... ) { LOG << "Unexpected exception" << std::endl; } return 0; }

Hello. I have absolutely the same issue - under Windows it works fine but under Linux crashes with "Transport endpoint is not connected" exceptin but in my case I catch it from call to io_service::run() - where it's already too late to fix something and server crashes. As I suppose for your case this crash happens within thread which is not that one where io_service::run() were called. -- View this message in context: http://boost.2283326.n4.nabble.com/Asio-unhandled-exception-tp2592299p353810... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (2)
-
Slav
-
Łukasz Majewski