1
This commit is contained in:
parent
c23180e417
commit
70634004d1
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user