瀏覽代碼

Fixed benchmark

Paul-Louis Ageneau 5 年之前
父節點
當前提交
82e604b869
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test/benchmark.cpp

+ 2 - 2
test/benchmark.cpp

@@ -157,9 +157,9 @@ size_t benchmark(milliseconds duration) {
 		cout << "Received: " << receivedSize.load() / 1000 << " KB" << endl;
 	}
 
-	if (auto adc2 = std::atomic_load(&dc2); adc2->isOpen()) {
+	if (auto adc2 = std::atomic_load(&dc2)) {
 		dc1->close();
-		while (!finished)
+		while (!finished && adc2->isOpen())
 			this_thread::sleep_for(100ms);
 	}