-
Notifications
You must be signed in to change notification settings - Fork 844
Closed
Labels
Description
In SSLNetVConnection.cc ,we see this:
int
SSLNetVConnection::sslStartHandShake(int event, int &err)
{
if (TSSystemState::is_ssl_handshaking_stopped()) {
Debug("ssl", "Stopping handshake due to server shutting down.");
return EVENT_ERROR;
}
if (sslHandshakeBeginTime == 0) {
sslHandshakeBeginTime = Thread::get_hrtime();
// net_activity will not be triggered until after the handshake
set_inactivity_timeout(HRTIME_SECONDS(SSLConfigParams::ssl_handshake_timeout_in));
}
In these code ,we reset the inactivity_timeout to SSLConfigParams::ssl_handshake_timeout_in
but the default value of SSLConfigParams::ssl_handshake_timeout_in is 0,this means we set the inactivity_timeout to 86400 seconds(1 day).
In my opinion, this code should be used only on server side.
Classicly,we set the inactivity timeout of sslnetvc before it's handshake,but now we reset it,in some situation, for example,bad net work,we can't read the packet, the vc will never be trigger with a write signal, then the vc will not be closed for 1 day,it may cause lot of CLOSE_WAIT.