Allow fc::canceled_exception to pass through places where we were catching and ignoring all fc::exceptions
This commit is contained in:
parent
27096f15a7
commit
d188b138d6
2 changed files with 10 additions and 3 deletions
|
|
@ -60,6 +60,10 @@ namespace fc
|
|||
break;
|
||||
}
|
||||
}
|
||||
catch (const fc::canceled_exception&)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
// this could fail to resolve but we want to go on to other hosts..
|
||||
catch ( const fc::exception& e )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,13 +44,16 @@ namespace fc {
|
|||
}
|
||||
|
||||
void promise_base::_wait( const microseconds& timeout_us ){
|
||||
if( timeout_us == microseconds::maximum() ) _wait_until( time_point::maximum() );
|
||||
else _wait_until( time_point::now() + timeout_us );
|
||||
if( timeout_us == microseconds::maximum() )
|
||||
_wait_until( time_point::maximum() );
|
||||
else
|
||||
_wait_until( time_point::now() + timeout_us );
|
||||
}
|
||||
void promise_base::_wait_until( const time_point& timeout_us ){
|
||||
{ synchronized(_spin_yield)
|
||||
if( _ready ) {
|
||||
if( _exceptp ) _exceptp->dynamic_rethrow_exception();
|
||||
if( _exceptp )
|
||||
_exceptp->dynamic_rethrow_exception();
|
||||
return;
|
||||
}
|
||||
_enqueue_thread();
|
||||
|
|
|
|||
Loading…
Reference in a new issue