refactor: Fix pool close method to prevent nil pointer dereference

This commit is contained in:
divyam234 2024-06-10 22:43:06 +05:30
parent df5c554c30
commit febdb3fe84

View file

@ -88,6 +88,9 @@ func (p *pool) Default(ctx context.Context) *tg.Client {
}
func (p *pool) Close() (err error) {
return p.close()
if p.close != nil {
return p.close()
}
return nil
}