From 9918a1092fb3ddd0ef71c687bf9d4933285ee29a Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 30 Aug 2019 09:39:46 -0700 Subject: [PATCH] JSON fix --- root/root.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/root/root.cpp b/root/root.cpp index 4e46a0c82..f0da286ef 100644 --- a/root/root.cpp +++ b/root/root.cpp @@ -739,10 +739,9 @@ int main(int argc,char **argv) bool first = true; std::lock_guard l(peersByIdentity_l); for(auto p=peersByIdentity.begin();p!=peersByIdentity.end();++p) { - if (first) { + if (first) first = false; - o << ','; - } + else o << ','; o << "{\"address\":\"" << p->first.address().toString(tmp) << "\"" ",\"latency\":-1"