fix: 修复 server.Server 关闭时线程池未释放的问题

This commit is contained in:
kercylan98 2023-07-07 16:37:31 +08:00
parent 1a2c1df289
commit 7228a07e7e
1 changed files with 4 additions and 0 deletions

View File

@ -384,6 +384,10 @@ func (slf *Server) shutdown(err error, stack ...string) {
if slf.ticker != nil { if slf.ticker != nil {
slf.ticker.Release() slf.ticker.Release()
} }
if slf.ants != nil {
slf.ants.Release()
slf.ants = nil
}
for _, cross := range slf.cross { for _, cross := range slf.cross {
cross.Release() cross.Release()
} }