Commit 31d07482 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Remove 3 second delay before disconnecting when max clients reached

This seems to be misguided and would only increase the chances of a DoS-type attack on TCP session resources.

A second 3-second delay upon malloc failure is also removed.
parent f00fe334
Pipeline #1080 passed with stage
in 23 minutes and 42 seconds
......@@ -5325,7 +5325,6 @@ void DLLCALL ftp_server(void* arg)
lprintf(LOG_WARNING,"%04d !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, startup->max_clients);
sockprintf(client_socket,-1,"421 Maximum active clients reached, please try again later.");
mswait(3000);
ftp_close_socket(&client_socket,&none,__LINE__);
continue;
}
......@@ -5334,7 +5333,6 @@ void DLLCALL ftp_server(void* arg)
lprintf(LOG_CRIT,"%04d !ERROR allocating %d bytes of memory for ftp_t"
,client_socket,(int)sizeof(ftp_t));
sockprintf(client_socket,-1,"421 System error, please try again later.");
mswait(3000);
ftp_close_socket(&client_socket,&none,__LINE__);
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment