added a function to get the monotonic time

This commit is contained in:
2024-12-09 19:04:22 +09:00
parent 464a550c68
commit de113d150f
4 changed files with 49 additions and 2 deletions

View File

@ -1100,7 +1100,8 @@ func (s *Server) AddNewServerConn(remote_addr *net.Addr, local_addr *net.Addr, p
return nil, fmt.Errorf("too many connections - %d", s.cts_limit)
}
id = rand.Uint32()
id = uint32(monotonic_time())
//id = rand.Uint32()
for {
_, ok = s.cts_map[id]
if !ok { break }