From dab77bf2edd8d7ee2a886cfb5a621a1512c87b09 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Fri, 28 Apr 2017 11:06:47 -0300 Subject: Remove the history cleanup for the requests. HTTP::UserAgent fixed a memory leak for the history (https://github.com/sergot/http-useragent/commit/60c21b9672a5c377e5ffd967aaea025e47816b27) Since it's a change with the public API of the library and fixes the memory problems on a long running process, we don't need this hack anymore --- lib/Matrix/Client/Requester.pm6 | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib') diff --git a/lib/Matrix/Client/Requester.pm6 b/lib/Matrix/Client/Requester.pm6 index f6244e3..b13272b 100644 --- a/lib/Matrix/Client/Requester.pm6 +++ b/lib/Matrix/Client/Requester.pm6 @@ -19,7 +19,6 @@ method get(Str $path, :$media = False, *%data) { } my $uri = uri_encode($.base-url(:$media) ~ $q); - $!ua.history = []; $!ua.get($uri) } @@ -35,13 +34,11 @@ multi method post(Str $path, Str $json, :$media = False) { my $req = HTTP::Request.new(POST => $.base-url(:$media) ~ $path ~ "?access_token=$!access-token", Content-Type => 'application/json'); $req.add-content($json); - $!ua.history = []; $!ua.request($req) } method post-bin(Str $path, Buf $buf, :$content-type) { my $req = POST($.base-url(:media) ~ $path ~ "?access_token=$!access-token", content => $buf, Content-Type => $content-type); - $!ua.history = []; $!ua.request($req) } @@ -53,7 +50,6 @@ multi method put(Str $path,Str $json) { my $req = HTTP::Request.new(PUT => $.base-url() ~ $path ~ "?access_token=$!access-token", Content-Type => 'application/json'); $req.add-content($json); - $!ua.history = []; $!ua.request($req) } -- cgit v1.2.3-54-g00ecf