dbms: better [#METR-19593].

This commit is contained in:
Alexey Milovidov 2016-01-06 23:37:50 +03:00
parent 6c712c1e7f
commit 4b1ebc764e

View File

@ -48,6 +48,12 @@ void TCPHandler::runImpl()
in = new ReadBufferFromPocoSocket(socket());
out = new WriteBufferFromPocoSocket(socket());
if (in->eof())
{
LOG_WARNING(log, "Client has not sent any data.");
return;
}
try
{
receiveHello();
@ -60,6 +66,12 @@ void TCPHandler::runImpl()
return;
}
if (e.code() == ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF)
{
LOG_WARNING(log, "Client has gone away.");
return;
}
try
{
/// Пытаемся отправить информацию об ошибке клиенту.