Commit 5059790e authored by Robert Butora's avatar Robert Butora
Browse files

Catch exception on remote_endpoint and so dispatch handleAccept again.

parent 234f8548
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -187,9 +187,20 @@ void Server::handleAccept(Session::SP session_sp,
    DEBUG_STREAM << "Server::handleAccept()" << endl;

    if(!ec)
    {
	 try
	 {
             session_sp->start();
	 }
	 catch(std::exception& ex)
         {
             ERROR_STREAM << "Server::handleAccept() " << ex.what() << endl;
         }
	 catch(...)
         {
             ERROR_STREAM << "Server::handleAccept() unknown error... " << endl;
         }
    }
    else
    {
        ERROR_STREAM << "Server::handleAccept() " << ec.message() << endl;