A finalizer was being set, but it was basically a no-op since the value in question would be pinned to the heap by a goroutine.
This fixes it so that the finalizer is set on a value that only the caller sees. So if the caller abandons the value without completing the RPC, the finalizer can be correctly run.
A finalizer was being set, but it was basically a no-op since the value in question would be pinned to the heap by a goroutine.
This fixes it so that the finalizer is set on a value that only the caller sees. So if the caller abandons the value without completing the RPC, the finalizer can be correctly run.