Remove usage of exceptional fdsets with select().
This commit is contained in:
@@ -765,16 +765,6 @@ static void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &
|
||||
}
|
||||
}
|
||||
|
||||
if ( sel.error( network_fd ) ) {
|
||||
/* network problem */
|
||||
break;
|
||||
}
|
||||
|
||||
if ( (!network.shutdown_in_progress()) && sel.error( host_fd ) ) {
|
||||
/* host problem */
|
||||
network.start_shutdown();
|
||||
}
|
||||
|
||||
/* quit if our shutdown has been acknowledged */
|
||||
if ( network.shutdown_in_progress() && network.shutdown_acknowledged() ) {
|
||||
break;
|
||||
|
||||
@@ -448,11 +448,6 @@ bool STMClient::main( void )
|
||||
/* we only read one socket each run */
|
||||
network_ready_to_read = true;
|
||||
}
|
||||
|
||||
if ( sel.error( *it ) ) {
|
||||
/* network problem */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( network_ready_to_read ) {
|
||||
@@ -493,16 +488,6 @@ bool STMClient::main( void )
|
||||
}
|
||||
}
|
||||
|
||||
if ( sel.error( STDIN_FILENO ) ) {
|
||||
/* user problem */
|
||||
if ( !network->has_remote_addr() ) {
|
||||
break;
|
||||
} else if ( !network->shutdown_in_progress() ) {
|
||||
overlays.get_notification_engine().set_notification_string( wstring( L"Exiting..." ), true );
|
||||
network->start_shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
/* quit if our shutdown has been acknowledged */
|
||||
if ( network->shutdown_in_progress() && network->shutdown_acknowledged() ) {
|
||||
clean_shutdown = true;
|
||||
|
||||
Reference in New Issue
Block a user