Commit 9d9a0a38 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

fix

parent a91ab05c
......@@ -83,15 +83,13 @@ func (d *Pool) WithContext(ctx context.Context) *Pool {
}
func (d *Pool) WithTimeout(dur time.Duration) *Pool {
ctx, cancel := context.WithTimeout(d.ctx, dur)
defer cancel()
ctx, _ := context.WithTimeout(d.ctx, dur)
return d.WithContext(ctx)
}
func (d *Pool) WithDeadline(dur time.Time) *Pool {
ctx, cancel := context.WithDeadline(d.ctx, dur)
defer cancel()
ctx, _ := context.WithDeadline(d.ctx, dur)
return d.WithContext(ctx)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment