style fix

This commit is contained in:
Yakov Olkhovskiy 2022-09-11 22:44:27 +00:00
parent ffa7d3b121
commit 7c855c9da2
2 changed files with 4 additions and 7 deletions

View File

@ -1882,7 +1882,7 @@ void Server::createServers(
return TCPServerConnectionFactory::Ptr(new TCPHandlerFactory(*this, false, false));
if (type == "tls")
#if USE_SSL
#if USE_SSL
return TCPServerConnectionFactory::Ptr(new TLSHandlerFactory(*this, conf_name));
#else
throw Exception{"SSL support for TCP protocol is disabled because Poco library was built without NetSSL support.",
@ -1975,7 +1975,7 @@ void Server::createServers(
});
}
}
for (const auto & listen_host : listen_hosts)
{
/// HTTP

View File

@ -15,12 +15,11 @@ namespace ErrorCodes
extern const int CANNOT_PARSE_INPUT_ASSERTION_FAILED;
}
void ProxyV1Handler::run()
{
const auto & settings = server.context()->getSettingsRef();
socket().setReceiveTimeout(settings.receive_timeout);
std::string word;
bool eol;
@ -57,7 +56,7 @@ void ProxyV1Handler::run()
// read port
if (!readWord(5, word, eol) || eol)
throw ParsingException("PROXY protocol violation", ErrorCodes::CANNOT_PARSE_INPUT_ASSERTION_FAILED);
// read port and "\r\n"
if (!readWord(5, word, eol) || !eol)
throw ParsingException("PROXY protocol violation", ErrorCodes::CANNOT_PARSE_INPUT_ASSERTION_FAILED);
@ -121,6 +120,4 @@ bool ProxyV1Handler::readWord(int max_len, std::string & word, bool & eol)
return false;
}
}