Skip to content

Commit

Permalink
refactor: Fix pool close method to prevent nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
divyam234 committed Jun 10, 2024
1 parent df5c554 commit febdb3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit febdb3f

Please sign in to comment.