reddit / baseplate.go

Reddit's Service Framework in Go
https://pkg.go.dev/github.com/reddit/baseplate.go
BSD 3-Clause "New" or "Revised" License
90 stars 76 forks source link

clientpool: Check Get after Close and return appropriate error #656

Closed fishy closed 3 months ago

fishy commented 3 months ago

Currently, when Get is Called after Close, we'll just get a nil client from the pool and the next c.IsOpen check will just panic, which makes it very hard to debug why. Add a check to return an appropriate error.