Fixed query disconnect and log message
This commit is contained in:
parent
bb3cc465d7
commit
e2335becd7
@ -501,7 +501,6 @@ void QueryClient::handle_decoded_message(const std::string_view &message) {
|
||||
}
|
||||
|
||||
std::string_view command_view{this->line_buffer + command_start_index, command_end_index - command_start_index};
|
||||
logTrace(0, "Found command: '{}'", command_view);
|
||||
this->command_queue->enqueue_command_string(command_view);
|
||||
|
||||
command_start_index = command_start_next;
|
||||
|
@ -29,7 +29,7 @@ bool QueryClientCommandHandler::handle_command(const std::string_view &command)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(command.empty()) {
|
||||
if(command.empty() || command.find_first_not_of(' ') == std::string::npos) {
|
||||
logTrace(LOG_QUERY, "[{}:{}] Got query idle command.", client->getLoggingPeerIp(), client->getPeerPort());
|
||||
client->resetIdleTime();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user