mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Check socket is connected in HTTPSession (#36683)
This commit is contained in:
parent
ca519ca75e
commit
7dc084419e
@ -22,12 +22,12 @@ void HTTPServerConnection::run()
|
|||||||
std::string server = params->getSoftwareVersion();
|
std::string server = params->getSoftwareVersion();
|
||||||
Poco::Net::HTTPServerSession session(socket(), params);
|
Poco::Net::HTTPServerSession session(socket(), params);
|
||||||
|
|
||||||
while (!stopped && tcp_server.isOpen() && session.hasMoreRequests())
|
while (!stopped && tcp_server.isOpen() && session.hasMoreRequests() && session.connected())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(mutex);
|
std::unique_lock<std::mutex> lock(mutex);
|
||||||
if (!stopped && tcp_server.isOpen())
|
if (!stopped && tcp_server.isOpen() && session.connected())
|
||||||
{
|
{
|
||||||
HTTPServerResponse response(session);
|
HTTPServerResponse response(session);
|
||||||
HTTPServerRequest request(context, response, session);
|
HTTPServerRequest request(context, response, session);
|
||||||
|
Loading…
Reference in New Issue
Block a user