Deliver sendto() exceptions without disturbing control flow
This prevents the client from waking up every 200 ms while the network is down. Addresses #243.
This commit is contained in:
committed by
Keith Winstein
parent
9dddcd8566
commit
67a85eaf99
@@ -415,6 +415,11 @@ void STMClient::main( void )
|
||||
}
|
||||
|
||||
network->tick();
|
||||
|
||||
const Network::NetworkException *exn = network->get_send_exception();
|
||||
if ( exn ) {
|
||||
overlays.get_notification_engine().set_network_exception( *exn );
|
||||
}
|
||||
} catch ( Network::NetworkException e ) {
|
||||
if ( !network->shutdown_in_progress() ) {
|
||||
overlays.get_notification_engine().set_network_exception( e );
|
||||
|
||||
Reference in New Issue
Block a user