Some updates
This commit is contained in:
@@ -77,7 +77,7 @@ void QueryClient::postInitialize() {
|
||||
if(ts::config::query::sslMode == 1 && this->connectionType != ConnectionType::SSL_ENCRIPTED) {
|
||||
command_result error{error::failed_connection_initialisation, "Please use a SSL encryption!"};
|
||||
this->notifyError(error);
|
||||
error.release_details();
|
||||
error.release_data();
|
||||
this->disconnect("Please us a SSL encryption for more security.\nThe server denies also all other connections!");
|
||||
return;
|
||||
}
|
||||
@@ -519,7 +519,7 @@ bool QueryClient::handleMessage(const pipes::buffer_view& message) {
|
||||
|
||||
handle_error:
|
||||
this->notifyError(error);
|
||||
error.release_details();
|
||||
error.release_data();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,8 +174,8 @@ command_result QueryClient::handleCommandLogin(Command& cmd) {
|
||||
if(!this->properties()[property::CLIENT_LOGIN_NAME].as<string>().empty()) {
|
||||
Command log("logout");
|
||||
auto result = this->handleCommandLogout(log);
|
||||
if(result.error_code()) {
|
||||
result.release_details();
|
||||
if(result.has_error()) {
|
||||
result.release_data();
|
||||
logError(this->getServerId(), "Query client failed to login from old login.");
|
||||
return command_result{error::vs_critical};
|
||||
}
|
||||
@@ -432,10 +432,10 @@ command_result QueryClient::handleCommandServerInfo(Command &) {
|
||||
cmd["connection_packets_received_control"] = total_stats.connection_packets_received[stats::ConnectionStatistics::category::COMMAND];
|
||||
cmd["connection_bytes_received_control"] = total_stats.connection_bytes_received[stats::ConnectionStatistics::category::COMMAND];
|
||||
|
||||
cmd["connection_packets_sent_total"] = std::accumulate(report_second.connection_packets_sent.begin(), report_second.connection_packets_sent.end(), 0U);
|
||||
cmd["connection_bytes_sent_total"] = std::accumulate(report_second.connection_bytes_sent.begin(), report_second.connection_bytes_sent.end(), 0U);
|
||||
cmd["connection_packets_received_total"] = std::accumulate(report_second.connection_packets_received.begin(), report_second.connection_packets_received.end(), 0U);
|
||||
cmd["connection_bytes_received_total"] = std::accumulate(report_second.connection_bytes_received.begin(), report_second.connection_bytes_received.end(), 0U);
|
||||
cmd["connection_packets_sent_total"] = std::accumulate(total_stats.connection_packets_sent.begin(), total_stats.connection_packets_sent.end(), 0U);
|
||||
cmd["connection_bytes_sent_total"] = std::accumulate(total_stats.connection_bytes_sent.begin(), total_stats.connection_bytes_sent.end(), 0U);
|
||||
cmd["connection_packets_received_total"] = std::accumulate(total_stats.connection_packets_received.begin(), total_stats.connection_packets_received.end(), 0U);
|
||||
cmd["connection_bytes_received_total"] = std::accumulate(total_stats.connection_bytes_received.begin(), total_stats.connection_bytes_received.end(), 0U);
|
||||
} else {
|
||||
cmd["connection_bandwidth_sent_last_second_total"] = "0";
|
||||
cmd["connection_bandwidth_sent_last_minute_total"] = "0";
|
||||
|
||||
Reference in New Issue
Block a user