try to print value of peerID for unknown client

This commit is contained in:
orignal
2026-10-01 15:13:12 -04:00
parent 3a488a3dcb
commit 4c48933c17
+5 -1
View File
@@ -622,7 +622,11 @@ namespace torrents
else if (peerIDStr.substr (0, 3) == "TIX")
return "Tixati";
return "Unknown";
std::string unknown("Unknown (");
for (auto ch: peerIDStr)
unknown.push_back (std::isprint ((uint8_t)ch) ? ch : '?');
unknown.push_back (')');
return unknown;
}
std::string JSONRPCHandler::HandleTorrentStop (boost::json::object&& jsonRequest)