Some webclient fixes

This commit is contained in:
WolverinDEV
2020-11-15 23:30:51 +01:00
parent 9b1de50f1b
commit b438684f20
5 changed files with 54 additions and 2 deletions
+6 -1
View File
@@ -716,6 +716,7 @@ void SpeakingClient::processJoin() {
} else if(this->getType() == ClientType::CLIENT_WEB) {
this->rtc_client_id = this->server->rtc_server().create_rtp_client(dynamic_pointer_cast<SpeakingClient>(this->ref()));
}
this->rtc_session_pending_describe = true;
TIMING_STEP(timings, "server reg ");
ref_server->getGroupManager()->cleanupAssignments(this->getClientDatabaseId());
@@ -929,7 +930,11 @@ command_result SpeakingClient::handleCommand(Command &command) {
command_result SpeakingClient::handleCommandRtcSessionDescribe(Command &command) {
CMD_REQ_SERVER;
CMD_CHK_AND_INC_FLOOD_POINTS(15);
if(this->rtc_session_pending_describe) {
this->rtc_session_pending_describe = false;
} else {
CMD_CHK_AND_INC_FLOOD_POINTS(15);
}
uint32_t mode;
if(command["mode"].string() == "offer") {
+1
View File
@@ -97,6 +97,7 @@ namespace ts::server {
std::shared_ptr<Json::Value> identityData;
} handshake;
bool rtc_session_pending_describe{false};
rtc::RTCClientId rtc_client_id{0};
};
}
+2 -1
View File
@@ -414,7 +414,8 @@ void WebClient::disconnectFinal() {
this->processLeave();
this->ssl_handler.finalize();
/* We do not finalize here since we might still try to send some data */
/* this->ssl_handler.finalize(); */
this->handle->unregisterConnection(static_pointer_cast<WebClient>(self_lock));
}