docs: 修复 server 在 WebSocket 模式下超时时间无效的问题

This commit is contained in:
kercylan98
2023-09-19 15:45:12 +08:00
parent 0cc8fd8186
commit 1bc32e2026
2 changed files with 7 additions and 6 deletions

View File

@@ -71,7 +71,13 @@ func (slf *Pool[T]) IsClose() bool {
}
func (slf *Pool[T]) Release(data T) {
slf.mutex.Lock()
if slf.releaser == nil {
slf.mutex.Unlock()
return
}
slf.releaser(data)
slf.mutex.Unlock()
slf.put(data)
}