summaryrefslogtreecommitdiff
path: root/examples/network
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-01 17:55:22 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-01 17:55:22 -0700
commit5587a9c93054643d66b022d03b975720e539cc3e (patch)
tree9066237c97077be789fd1498ef9f400e743b9aa5 /examples/network
parent52877c897504ed610bc957b88b6ba9e442077c07 (diff)
parent42ea35c06157a5c75cfd20e8fe3a813140c26485 (diff)
downloadlibgit2-5587a9c93054643d66b022d03b975720e539cc3e.tar.gz
Merge pull request #658 from schu/remote-disconnect
remote: don't free transport on disconnect
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/fetch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/network/fetch.c b/examples/network/fetch.c
index d4a39746f..23046bd09 100644
--- a/examples/network/fetch.c
+++ b/examples/network/fetch.c
@@ -93,6 +93,9 @@ int fetch(git_repository *repo, int argc, char **argv)
} while (!data.finished);
printf("\rReceived %d/%d objects in %d bytes\n", stats.processed, stats.total, bytes);
+ // Disconnect the underlying connection to prevent from idling.
+ git_remote_disconnect(remote);
+
// Update the references in the remote's namespace to point to the
// right commits. This may be needed even if there was no packfile
// to download, which can happen e.g. when the branches have been