Limiting server's peer_response_timeout.

This commit is contained in:
Xie Han
2024-03-13 17:32:18 +08:00
parent c32b28696c
commit 9658bb00c6

View File

@@ -90,6 +90,12 @@ int WFServerBase::init(const struct sockaddr *bind_addr, socklen_t addrlen,
{
int timeout = this->params.peer_response_timeout;
if (this->params.receive_timeout >= 0)
{
if ((unsigned int)timeout > (unsigned int)this->params.receive_timeout)
timeout = this->params.receive_timeout;
}
if (this->params.transport_type == TT_TCP_SSL ||
this->params.transport_type == TT_SCTP_SSL)
{