Fixing missing wait call for pool chrome instances

This commit is contained in:
Kenneth Shaw 2017-02-18 09:49:41 +07:00
parent 6c5096f06a
commit 21d13b8f0a

View File

@ -144,12 +144,14 @@ type Res struct {
func (r *Res) Release() error {
r.cancel()
err := r.c.Wait()
r.p.rw.Lock()
defer r.p.rw.Unlock()
delete(r.p.res, r.port)
return nil
return err
}
// Port returns the allocated port for the pool resource.