Commit 21361cb7 by Vicent Marti

Merge pull request #2719 from libgit2/cmn/fetch-twice

fetch: clear the connection data on close
parents d7674b57 1ca61bdc
......@@ -1009,6 +1009,7 @@ static int http_close(git_smart_subtransport *subtransport)
git_vector_clear(&t->auth_contexts);
gitno_connection_data_free_ptrs(&t->connection_data);
memset(&t->connection_data, 0x0, sizeof(gitno_connection_data));
return 0;
}
......
......@@ -202,3 +202,14 @@ void test_online_fetch__remote_symrefs(void)
git_remote_free(remote);
}
void test_online_fetch__twice(void)
{
git_remote *remote;
cl_git_pass(git_remote_create(&remote, _repo, "test", "http://github.com/libgit2/TestGitRepository.git"));
cl_git_pass(git_remote_fetch(remote, NULL, NULL, NULL));
cl_git_pass(git_remote_fetch(remote, NULL, NULL, NULL));
git_remote_free(remote);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment