summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-01-30 15:15:10 +0100
committerMagnus Ahltorp <map@kth.se>2015-01-30 15:15:10 +0100
commitd85f454da0685e199378aa1b93c2483c6fa19544 (patch)
treef219c43f0024a22dd94d22dd566d574f8cb1e995
parenta41c8ee4643b4cf299858eacecfbc769a614a22c (diff)
Close hackney connection after use
-rw-r--r--src/plop.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plop.erl b/src/plop.erl
index 780dcbe..3b54a89 100644
--- a/src/plop.erl
+++ b/src/plop.erl
@@ -209,6 +209,7 @@ send_http_request(TreeLeafHash, URL, Headers, RequestBody) ->
lager:debug("leafhash ~s: received headers for ~p", [mochihex:to_hex(TreeLeafHash), URL]),
{ok, Body} = hackney:body(ClientRef),
Stoptime = os:timestamp(),
+ hackney:close(ClientRef),
lager:debug("leafhash ~s: received body for ~p: time ~p", [mochihex:to_hex(TreeLeafHash), URL, timer:now_diff(Stoptime, Starttime)]),
StatusLine = {none, StatusCode, none},
ParentPid ! {http, {RequestId, {StatusLine, RespHeaders, Body}}}