This commit is contained in:
azw 2023-04-23 03:38:36 +00:00
parent c23180e417
commit 70634004d1

View File

@ -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<KcpSession>();
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()