From daa1b56f3aabea18a64bd0d7276882fdedc132ea Mon Sep 17 00:00:00 2001 From: Shawn Date: Wed, 23 Apr 2025 15:18:01 +0800 Subject: [PATCH] Fix issue #321 --- YSFGateway/YSFNetwork.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/YSFGateway/YSFNetwork.cpp b/YSFGateway/YSFNetwork.cpp index 988ab50..a6abafb 100644 --- a/YSFGateway/YSFNetwork.cpp +++ b/YSFGateway/YSFNetwork.cpp @@ -119,6 +119,8 @@ bool CYSFNetwork::setDestination(const std::string& name, const sockaddr_storage m_addrLen = addrLen; m_linked = false; + close(); + bool ret = open(); if (ret) { m_pollTimer.start();