Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/dev-dependencies-cddfeb1403'

This commit is contained in:
Yukino Song
2024-10-29 01:57:22 +08:00
13 changed files with 68 additions and 124 deletions

View File

@@ -1004,14 +1004,6 @@ namespace nvhttp {
return;
}
if (rtsp_stream::session_count() == config::stream.channels) {
tree.put("root.resume", 0);
tree.put("root.<xmlattr>.status_code", 503);
tree.put("root.<xmlattr>.status_message", "The host's concurrent stream limit has been reached. Stop an existing stream or increase the 'Channels' value in the Sunshine Web UI.");
return;
}
auto args = request->parse_query_string();
if (
args.find("rikey"s) == std::end(args) ||
@@ -1112,16 +1104,6 @@ namespace nvhttp {
return;
}
// It is possible that due a race condition that this if-statement gives a false negative,
// that is automatically resolved in rtsp_server_t
if (rtsp_stream::session_count() == config::stream.channels) {
tree.put("root.resume", 0);
tree.put("root.<xmlattr>.status_code", 503);
tree.put("root.<xmlattr>.status_message", "The host's concurrent stream limit has been reached. Stop an existing stream or increase the 'Channels' value in the Sunshine Web UI.");
return;
}
auto current_appid = proc::proc.running();
if (current_appid == 0) {
tree.put("root.resume", 0);
@@ -1213,19 +1195,11 @@ namespace nvhttp {
return;
}
// It is possible that due a race condition that this if-statement gives a false positive,
// the client should try again
if (rtsp_stream::session_count() != 0) {
tree.put("root.resume", 0);
tree.put("root.<xmlattr>.status_code", 503);
tree.put("root.<xmlattr>.status_message", "All sessions must be disconnected before quitting");
return;
}
tree.put("root.cancel", 1);
tree.put("root.<xmlattr>.status_code", 200);
rtsp_stream::terminate_sessions();
if (proc::proc.running() > 0) {
proc::proc.terminate();
}