gomemcache icon indicating copy to clipboard operation
gomemcache copied to clipboard

propogate err to condRelease in withAddrRw

Open jlisthood opened this issue 1 year ago • 1 comments

Currently, withAddrRw always calls defer cn.condRelease(&err) with an err that is nil. This means no matter what error happens in fn, the connection will get sent back to the pool even if there is a non-resumable error. This isn't ideal because we could be sending bad connections back to the pool.

This PR matches the implementation with onItem that seems to handle the error correctly.

jlisthood avatar Sep 12 '23 05:09 jlisthood