From 08ad52989d0c4f18a26019ffbf17d1c45fb777ca Mon Sep 17 00:00:00 2001 From: lanthora Date: Fri, 27 Jun 2025 22:41:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=B7=AF=E7=94=B1=E5=89=8D?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E7=BD=91=E5=8D=A1=E5=B7=B2=E7=BB=8F=E5=90=AF?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tun/tun.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tun/tun.cc b/src/tun/tun.cc index 527c384f..e5f42355 100644 --- a/src/tun/tun.cc +++ b/src/tun/tun.cc @@ -113,13 +113,13 @@ void Tun::handleTunAddr(Msg msg) { return; } - this->tunThread = std::thread([&] { - if (up()) { - spdlog::critical("tun up failed"); - Candy::shutdown(this->client); - return; - } + if (up()) { + spdlog::critical("tun up failed"); + Candy::shutdown(this->client); + return; + } + this->tunThread = std::thread([&] { spdlog::info("start thread: tun"); while (this->client->running) { handleTunDevice();