From 08cd7e9d9e98e62fae564bc0d42aabb7bc50070c Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 17 Apr 2021 00:17:31 +0200 Subject: [PATCH] Fixed disconnect due to auto update --- server/src/client/command_handler/misc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/client/command_handler/misc.cpp b/server/src/client/command_handler/misc.cpp index 0a3a372..109515e 100644 --- a/server/src/client/command_handler/misc.cpp +++ b/server/src/client/command_handler/misc.cpp @@ -309,8 +309,9 @@ command_result ConnectedClient::handleCommandGetConnectionInfo(Command &cmd) { command_result ConnectedClient::handleCommandSetConnectionInfo(Command &cmd) { auto info = std::make_shared(); info->timestamp = chrono::system_clock::now(); - for (const auto &key : cmd[0].keys()) + for (const auto &key : cmd[0].keys()) { info->properties.insert({key, cmd[key].string()}); + } /* CONNECTION_FILETRANSFER_BANDWIDTH_SENT, //how many bytes per second are currently being sent by file transfers @@ -339,10 +340,12 @@ command_result ConnectedClient::handleCommandSetConnectionInfo(Command &cmd) { //connectioninfoautoupdate connection_server2client_packetloss_speech=0.0000 connection_server2client_packetloss_keepalive=0.0010 connection_server2client_packetloss_control=0.0000 connection_server2client_packetloss_total=0.0009 command_result ConnectedClient::handleCommandConnectionInfoAutoUpdate(Command &cmd) { + /* FIXME: Reimplement this! this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_KEEPALIVE] = cmd["connection_server2client_packetloss_keepalive"].as(); this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_CONTROL] = cmd["connection_server2client_packetloss_control"].as(); this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_SPEECH] = cmd["connection_server2client_packetloss_speech"].as(); this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_TOTAL] = cmd["connection_server2client_packetloss_total"].as(); + */ return command_result{error::ok}; }