diff --git a/service/OneService.cpp b/service/OneService.cpp index b41abb60..866ed728 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1663,6 +1663,7 @@ public: ZT_PeerList *pl = _node->peers(); if (pl) { + bool foundBond = false; auto id = req.matches[1]; auto out = json::object(); uint64_t wantp = Utils::hexStrToU64(id.str().c_str()); @@ -1672,12 +1673,18 @@ public: if (bond) { _peerToJson(out,&(pl->peers[i]),bond,(_tcpFallbackTunnel != (TcpConnection *)0)); setContent(req, res, out.dump()); + foundBond = true; } else { setContent(req, res, ""); res.status = 400; } + break; } } + if (!foundBond) { + setContent(req, res, ""); + res.status = 400; + } } _node->freeQueryResult((void *)pl); };