client: fix double uv_close()
client: use separate variables for finalization