fix http return value from one service when nework list is empty

This commit is contained in:
Grant Limberg 2022-03-04 12:35:11 -08:00
parent 544a4de1e0
commit ecde26c823
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735

View file

@ -1577,7 +1577,6 @@ public:
} }
} else if (ps[0] == "network") { } else if (ps[0] == "network") {
Mutex::Lock _l(_nets_m); Mutex::Lock _l(_nets_m);
if (!_nets.empty()) {
if (ps.size() == 1) { if (ps.size() == 1) {
// Return [array] of all networks // Return [array] of all networks
@ -1605,10 +1604,6 @@ public:
fprintf(stderr, "not found\n"); fprintf(stderr, "not found\n");
scode = 404; scode = 404;
} }
} else {
fprintf(stderr, "_nets is empty??\n");
scode = 500;
}
} else if (ps[0] == "peer") { } else if (ps[0] == "peer") {
ZT_PeerList *pl = _node->peers(); ZT_PeerList *pl = _node->peers();
if (pl) { if (pl) {