I'm not sure that it's valid to call `uv_close` on the handle before its initialized, so this should probably happen farther up in the function.