summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-17 08:28:40 +0200
committerGitHub <noreply@github.com>2020-10-17 08:28:40 +0200
commit1eb908bc880a818b9fc77d8994f3f7221c4621fe (patch)
tree2c97b0aacdd36fb0c797cebdb7463314f9a01e40 /src
parentMerge pull request #4798 from lioncash/input-copy (diff)
parentservice: bcat: Check client connection before interacting with socket. (diff)
downloadyuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar
yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.gz
yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.bz2
yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.lz
yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.xz
yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.zst
yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/bcat/backend/boxcat.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp
index 589e288df..3b6f7498e 100644
--- a/src/core/hle/service/bcat/backend/boxcat.cpp
+++ b/src/core/hle/service/bcat/backend/boxcat.cpp
@@ -454,6 +454,16 @@ Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global,
{std::string("Boxcat-Client-Type"), std::string(BOXCAT_CLIENT_TYPE)},
};
+ if (!client.is_valid()) {
+ LOG_ERROR(Service_BCAT, "Client is invalid, going offline!");
+ return StatusResult::Offline;
+ }
+
+ if (!client.is_socket_open()) {
+ LOG_ERROR(Service_BCAT, "Failed to open socket, going offline!");
+ return StatusResult::Offline;
+ }
+
const auto response = client.Get(BOXCAT_PATHNAME_EVENTS, headers);
if (response == nullptr)
return StatusResult::Offline;