Re: [asio-users] transport endpoint not connected
Brought to you by:
chris_kohlhoff
From: Christopher K. <ch...@ko...> - 2007-02-12 11:13:07
|
On Mon, 12 Feb 2007 11:26:33 +0200, "Vlad" <vl...@gm...> said: > Hello to all! > > I've written some simple http server application. It works fine, but > sometimes > (very rare, average 1 time/20000 requests) > io_service->run() finishes with exception "transport endpoint not > connected". > Server dies. > > How to make server to live after that exception ? I suppose the first question is: where is the exception coming from? Can you debug it with a breakpoint on the exception being thrown? Also what version of asio are you using? If the io_service::run() call exits due to an exception then you can just restart it. E.g. see here: http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/reference/io_service_handler_exception.html Cheers, Chris |