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:
commit
670a3f6f5b
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue