From 4818194ff8c36698dd54993cc74fa77a3629ee3c Mon Sep 17 00:00:00 2001 From: wangtf Date: Thu, 15 Aug 2019 17:59:34 +0800 Subject: [PATCH] add Authenticator to requestKey --- server-packet.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server-packet.go b/server-packet.go index f9ef180..a2d8937 100644 --- a/server-packet.go +++ b/server-packet.go @@ -95,8 +95,9 @@ func (s *PacketServer) Serve(conn net.PacketConn) error { s.mu.Unlock() type requestKey struct { - IP string - Identifier byte + IP string + Identifier byte + Authenticator [16]byte } var ( @@ -151,8 +152,9 @@ func (s *PacketServer) Serve(conn net.PacketConn) error { } key := requestKey{ - IP: remoteAddr.String(), - Identifier: packet.Identifier, + IP: remoteAddr.String(), + Identifier: packet.Identifier, + Authenticator: packet.Authenticator, } requestsLock.Lock() if _, ok := requests[key]; ok {