Merge pull request #1960 from BeccaLabs/fix/rpc-device-init

fix: initialize rpc_device endpoint and device index before parsing
This commit is contained in:
Kawrakow 2026-06-14 08:14:07 +02:00 committed by GitHub
commit 670a3f6f5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,6 +176,8 @@ static std::vector<rpc_device> extract_device_from_rpc_device(std::vector<std::
std::vector<rpc_device> rpc_servers;
for (auto & device : devices) {
rpc_device rpc;
rpc.device = 0;
rpc.endpoint = device;
auto value = string_split(device, "|");
if (value.size() == 2) {
rpc.device = std::stoi(value[1]);