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:
Keegan McAllister
2012-05-02 00:14:59 -04:00
committed by Keith Winstein
parent 9dddcd8566
commit 67a85eaf99
4 changed files with 32 additions and 5 deletions
+5
View File
@@ -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 );