mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-01-09 00:29:57 +08:00
refactor: Fix pool close method to prevent nil pointer dereference
This commit is contained in:
parent
df5c554c30
commit
febdb3fe84
1 changed files with 4 additions and 1 deletions
|
@ -88,6 +88,9 @@ func (p *pool) Default(ctx context.Context) *tg.Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *pool) Close() (err error) {
|
func (p *pool) Close() (err error) {
|
||||||
return p.close()
|
|
||||||
|
|
||||||
|
if p.close != nil {
|
||||||
|
return p.close()
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue