diff options
| author | 2020-10-16 23:28:40 -0700 | |
|---|---|---|
| committer | 2020-10-16 23:28:40 -0700 | |
| commit | 1eb908bc880a818b9fc77d8994f3f7221c4621fe (patch) | |
| tree | 2c97b0aacdd36fb0c797cebdb7463314f9a01e40 /src | |
| parent | Merge pull request #4798 from lioncash/input-copy (diff) | |
| parent | service: bcat: Check client connection before interacting with socket. (diff) | |
| download | yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.gz yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.tar.xz yuzu-1eb908bc880a818b9fc77d8994f3f7221c4621fe.zip | |
Merge pull request #4797 from bunnei/bcat-errors
service: bcat: Check client connection before interacting with socket.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 10 |
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, | |||
| 454 | {std::string("Boxcat-Client-Type"), std::string(BOXCAT_CLIENT_TYPE)}, | 454 | {std::string("Boxcat-Client-Type"), std::string(BOXCAT_CLIENT_TYPE)}, |
| 455 | }; | 455 | }; |
| 456 | 456 | ||
| 457 | if (!client.is_valid()) { | ||
| 458 | LOG_ERROR(Service_BCAT, "Client is invalid, going offline!"); | ||
| 459 | return StatusResult::Offline; | ||
| 460 | } | ||
| 461 | |||
| 462 | if (!client.is_socket_open()) { | ||
| 463 | LOG_ERROR(Service_BCAT, "Failed to open socket, going offline!"); | ||
| 464 | return StatusResult::Offline; | ||
| 465 | } | ||
| 466 | |||
| 457 | const auto response = client.Get(BOXCAT_PATHNAME_EVENTS, headers); | 467 | const auto response = client.Get(BOXCAT_PATHNAME_EVENTS, headers); |
| 458 | if (response == nullptr) | 468 | if (response == nullptr) |
| 459 | return StatusResult::Offline; | 469 | return StatusResult::Offline; |