Skip to content

Commit

Permalink
Update pool.go (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
mizy authored Feb 14, 2023
1 parent e133a77 commit 04ec84c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ccore/nebula/gateway/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,15 @@ func ClearClients() {
}

func recycleClients() {
clientMux.Lock()
for _, client := range clientPool {
now := time.Now().Unix()
expireAt := client.updateTime + SessionExpiredDuration
if now > expireAt {
client.CloseChannel <- true
}
}
clientMux.Unlock()
}

func handleRequest(nsid string) {
Expand Down

0 comments on commit 04ec84c

Please sign in to comment.