diff --git a/src/asio.cpp b/src/asio.cpp index befa2ed..6432ea8 100644 --- a/src/asio.cpp +++ b/src/asio.cpp @@ -11,12 +11,15 @@ namespace fc { else { // elog( "%s", boost::system::system_error(ec).what() ); // p->set_exception( fc::copy_exception( boost::system::system_error(ec) ) ); +#if 0 if( ec == boost::asio::error::operation_aborted ) { p->set_exception( fc::exception_ptr( new fc::canceled_exception( FC_LOG_MESSAGE( error, "${message} ", ("message", boost::system::system_error(ec).what())) ) ) ); } - else if( ec == boost::asio::error::eof ) + else +#endif + if( ec == boost::asio::error::eof ) { p->set_exception( fc::exception_ptr( new fc::eof_exception( FC_LOG_MESSAGE( error, "${message} ", ("message", boost::system::system_error(ec).what())) ) ) ); @@ -39,12 +42,15 @@ namespace fc { p->set_value(); else { +#if 0 if( ec == boost::asio::error::operation_aborted ) { p->set_exception( fc::exception_ptr( new fc::canceled_exception( FC_LOG_MESSAGE( error, "${message} ", ("message", boost::system::system_error(ec).what())) ) ) ); } - else if( ec == boost::asio::error::eof ) + else +#endif + if( ec == boost::asio::error::eof ) { p->set_exception( fc::exception_ptr( new fc::eof_exception( FC_LOG_MESSAGE( error, "${message} ", ("message", boost::system::system_error(ec).what())) ) ) ); diff --git a/src/network/udt_socket.cpp b/src/network/udt_socket.cpp index ee4dbb5..3ac14a6 100644 --- a/src/network/udt_socket.cpp +++ b/src/network/udt_socket.cpp @@ -115,7 +115,7 @@ namespace fc { auto read_itr = _read_promises.find( udt_socket_id ); if( read_itr != _read_promises.end() ) { - read_itr->second->set_exception( fc::copy_exception( fc::canceled_exception() ) ); + read_itr->second->set_exception( fc::copy_exception( fc::exception() ) ); _read_promises.erase(read_itr); } } @@ -123,7 +123,7 @@ namespace fc { auto write_itr = _write_promises.find( udt_socket_id ); if( write_itr != _write_promises.end() ) { - write_itr->second->set_exception( fc::copy_exception( fc::canceled_exception() ) ); + write_itr->second->set_exception( fc::copy_exception( fc::exception() ) ); _write_promises.erase(write_itr); } }