Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remote: clear self handle only on error
When setting the callbacks fails, we want to clear self._self_handle so we don't leak a pointer to ourselves. The current code used a 'finally' clause which clears it unconditionally, which means that by the time the fetch starts, we have no guarantee that the handle will be valid. Replace that with an except and re-raise to make sure we only clear it here if there was an error.
- Loading branch information