gomemcache
gomemcache copied to clipboard
propogate err to condRelease in withAddrRw
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.