mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-01 19:50:42 +00:00
锁机制暂时删除
This commit is contained in:
parent
6c3c09428e
commit
61768ae0aa
@ -146,8 +146,8 @@ retry:
|
||||
}
|
||||
|
||||
//得到一个tcp隧道
|
||||
//TODO 超时问题 锁机制问题 对单个客户端加锁
|
||||
func (s *Tunnel) GetTunnel(cFlag string, en, de int, crypt, mux bool) (c *utils.Conn, err error) {
|
||||
s.tunnelLock.Lock()
|
||||
if v, ok := s.TunnelList[cFlag]; !ok || v.Len() < 3 { //新建通道
|
||||
go s.newChan(cFlag)
|
||||
}
|
||||
@ -161,7 +161,6 @@ retry:
|
||||
goto retry
|
||||
}
|
||||
c.WriteConnInfo(en, de, crypt, mux)
|
||||
s.tunnelLock.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user