mirror of
https://github.com/ehang-io/nps.git
synced 2026-10-31 16:52:12 +08:00
Connection disconnection |ip limit bug
This commit is contained in:
1 parent
572dcd2aab
commit
e24b2921ac
5 files changed
+51
-43
No files matched your search
+1
-1
@@ -324,7 +324,7 @@ func (s *Bridge) register(c *conn.Conn) {
|
||||
var hour int32
|
||||
if err := binary.Read(c, binary.LittleEndian, &hour); err == nil {
|
||||
s.registerLock.Lock()
|
||||
s.Register[common.GetIpByAddr(c.Conn.RemoteAddr().String())] = time.Now().Add(time.Minute * time.Duration(hour))
|
||||
s.Register[common.GetIpByAddr(c.Conn.RemoteAddr().String())] = time.Now().Add(time.Hour * time.Duration(hour))
|
||||
s.registerLock.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user