浏览代码

clear variables between gets for `dump`

Grant Limberg 3 年之前
父节点
当前提交
05df378dce
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      one.cpp

+ 3 - 0
one.cpp

@@ -1121,6 +1121,9 @@ static int cli(int argc,char **argv)
 		}
 		dump << responseBody << ZT_EOL_S;
 
+		responseHeaders.clear();
+		responseBody = "";
+
 		// get bonds
 		dump << ZT_EOL_S << "bonds" << ZT_EOL_S << "-----" << ZT_EOL_S;
 		scode = Http::GET(1024 * 1024 * 16,60000,(const struct sockaddr *)&addr,"/bonds",requestHeaders,responseHeaders,responseBody);