diff options
author | Matias Linares <matiaslina@gmail.com> | 2017-04-28 11:06:47 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2017-04-28 11:06:47 -0300 |
commit | dab77bf2edd8d7ee2a886cfb5a621a1512c87b09 (patch) | |
tree | d9ca82992a47e13dc7c2b8016fbd7e14b386c7be /lib/Matrix/Client | |
parent | 7535d28d8ee8ba11f026320c07e019f4d1abc471 (diff) | |
download | perl6-matrix-client-dab77bf2edd8d7ee2a886cfb5a621a1512c87b09.tar.gz |
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
Diffstat (limited to 'lib/Matrix/Client')
-rw-r--r-- | lib/Matrix/Client/Requester.pm6 | 4 |
1 files changed, 0 insertions, 4 deletions
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) } |