mirror of
https://github.com/ehang-io/nps.git
synced 2026-10-31 16:52:12 +08:00
Stop tickers to free up resources (#263)
This commit is contained in:
1 parent
bdf12fe22a
commit
88dcea59ec
5 files changed
+8
-1
No files matched your search
@@ -342,6 +342,7 @@ func (s *Bridge) SendLinkInfo(clientId int, link *conn.Link, t *file.Tunnel) (ta
|
||||
|
||||
func (s *Bridge) ping() {
|
||||
ticker := time.NewTicker(time.Second * 5)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
|
||||
Reference in new issue
Block a user