diff --git a/server/wsproxy/GCListener.cc b/server/wsproxy/GCListener.cc index 5755809..35043eb 100644 --- a/server/wsproxy/GCListener.cc +++ b/server/wsproxy/GCListener.cc @@ -379,15 +379,17 @@ void GCListener::ProcUdpPacket(a8::UdpPacket* pkt) { long long key = pkt->GetRemoteKey(); auto session = GetKcpSessionByRemoteKey(key); - if (!session) { + if (session) { + session->OnRecvPacket(pkt); + #if 0 ++kcp_socket_handle_; kcp_socket_handle_ = 123; session = std::make_shared(); session->Init(udp_listener_.get(), kcp_socket_handle_, pkt); kcp_session_addr_hash_[key] = session; kcp_session_handle_hash_[kcp_socket_handle_] = session; + #endif } - session->OnRecvPacket(pkt); } void GCListener::Update()