Fixed disconnect due to auto update

This commit is contained in:
WolverinDEV 2021-04-17 00:17:31 +02:00
parent 31fd33513f
commit 08cd7e9d9e
1 changed files with 4 additions and 1 deletions

View File

@ -309,8 +309,9 @@ command_result ConnectedClient::handleCommandGetConnectionInfo(Command &cmd) {
command_result ConnectedClient::handleCommandSetConnectionInfo(Command &cmd) {
auto info = std::make_shared<ConnectionInfoData>();
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<std::string>();
this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_CONTROL] = cmd["connection_server2client_packetloss_control"].as<std::string>();
this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_SPEECH] = cmd["connection_server2client_packetloss_speech"].as<std::string>();
this->properties()[property::CONNECTION_SERVER2CLIENT_PACKETLOSS_TOTAL] = cmd["connection_server2client_packetloss_total"].as<std::string>();
*/
return command_result{error::ok};
}