Close the handle before calling uv_run here, otherwise we'd get an assert in debug mode IIRC, because the loop cannot be destroyed.