mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 13:27:59 +03:00
fix: delete client, if he empty
This commit is contained in:
@@ -149,7 +149,10 @@ std::string Client::generateRespons(void)
|
||||
|
||||
bool Client::readyToSend(void)
|
||||
{
|
||||
return(_request.ok());
|
||||
if (_request.ok())
|
||||
return(_request.ok());
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void Client::printClientInfo(void)
|
||||
@@ -183,6 +186,15 @@ void Client::printClientInfo(void)
|
||||
|
||||
}
|
||||
|
||||
bool Client::isEmpty(void)
|
||||
{
|
||||
if (!_request.ok() && _request.getHeaderSize() == 0
|
||||
&& _request.getContentLength() == 0)
|
||||
return (true);
|
||||
else
|
||||
return (false);
|
||||
}
|
||||
|
||||
void Client::clear(void)
|
||||
{
|
||||
_fd = -1;
|
||||
|
||||
Reference in New Issue
Block a user