mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-06 07:06:53 +00:00
MUX optimization
This commit is contained in:
@@ -44,6 +44,12 @@ func (s *connMap) Close() {
|
||||
s.closeCh <- struct{}{}
|
||||
}
|
||||
|
||||
func (s *connMap) Delete(id int32) {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
delete(s.connMap, id)
|
||||
}
|
||||
|
||||
func (s *connMap) clean() {
|
||||
ticker := time.NewTimer(time.Minute * 1)
|
||||
for {
|
||||
|
Reference in New Issue
Block a user