Fixing panic on Pool.Release
This commit is contained in:
parent
a6d06c7524
commit
efc98098b4
5
pool.go
5
pool.go
|
@ -145,7 +145,10 @@ type Res struct {
|
||||||
func (r *Res) Release() error {
|
func (r *Res) Release() error {
|
||||||
r.cancel()
|
r.cancel()
|
||||||
|
|
||||||
err := r.c.Wait()
|
var err error
|
||||||
|
if r.c != nil {
|
||||||
|
err = r.c.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
defer r.p.debugf("pool released %d", r.port)
|
defer r.p.debugf("pool released %d", r.port)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user