Not Callback ExpireFunc In Pool.Get()

This commit is contained in:
Wlvs530 2020-12-05 13:21:18 +08:00
parent 57a82ebcc0
commit 80c4786afd

View File

@ -114,6 +114,8 @@ func (p *Pool) Get() (interface{}, error) {
f := r.(*poolItem)
if f.expire == 0 || f.expire > gtime.TimestampMilli() {
return f.value, nil
} else if p.ExpireFunc != nil {
p.ExpireFunc(f.value)
}
} else {
break