When not connected, (1) client hops port numbers (2) server stops sending.

This commit is contained in:
Keith Winstein
2012-08-13 11:19:25 +03:00
parent 56093d2961
commit 89da6105aa
3 changed files with 35 additions and 2 deletions
+2 -2
View File
@@ -526,7 +526,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
const int timeout_if_no_client = 60000;
int timeout = min( network.wait_time(), terminal.wait_time( now ) );
if ( !network.has_remote_addr() ) {
if ( !network.get_remote_state_num() ) {
timeout = min( timeout, timeout_if_no_client );
}
@@ -696,7 +696,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
}
}
if ( !network.has_remote_addr()
if ( !network.get_remote_state_num()
&& time_since_remote_state >= uint64_t( timeout_if_no_client ) ) {
fprintf( stderr, "No connection within %d seconds.\n",
timeout_if_no_client / 1000 );