From 22f5ad77aad4da275266ce26389fde7b63fd5af6 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Fri, 22 Nov 2019 00:12:42 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Don=E2=80=99t=20memoize=20HTTP::Client=20in?= =?UTF-8?q?=20Transport::HTTP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This leads to problems with MT and/or OpenSSL --- src/raven/transports/http.cr | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/raven/transports/http.cr b/src/raven/transports/http.cr index 2567f97..1867219 100644 --- a/src/raven/transports/http.cr +++ b/src/raven/transports/http.cr @@ -11,8 +11,6 @@ module Raven end end - property client : ::HTTP::Client { build_client } - private def build_client ssl = configuration.ssl ssl = configuration.scheme == "https" if ssl.nil? @@ -45,6 +43,8 @@ module Raven str << params end logger.debug "HTTP Transport connecting to #{path}" + + client = build_client client.post(path, form: data, headers: headers).tap do |response| raise Error.new response unless response.success? end @@ -55,7 +55,6 @@ module Raven logger.debug "Event not sent: #{configuration.error_messages}" return end - logger.debug "HTTP Transport connecting to #{configuration.dsn}" project_id = configuration.project_id path = configuration.path.try &.chomp '/' @@ -67,6 +66,9 @@ module Raven if configuration.encoding.gzip? headers["Content-Encoding"] = "gzip" end + logger.debug "HTTP Transport connecting to #{configuration.dsn}" + + client = build_client client.post("#{path}/api/#{project_id}/store/", headers, data).tap do |response| raise Error.new response unless response.success? end From ba4eda624ea849c489a57170ce7ca3bdf4f626d6 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Fri, 22 Nov 2019 22:51:19 +0100 Subject: [PATCH 2/2] Bump to v1.5.4 --- shard.yml | 2 +- src/raven/version.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shard.yml b/shard.yml index 3605ed1..f7b6e47 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: raven -version: 1.5.3 +version: 1.5.4 authors: - Sijawusz Pur Rahnama diff --git a/src/raven/version.cr b/src/raven/version.cr index c8a6ff9..05105e4 100644 --- a/src/raven/version.cr +++ b/src/raven/version.cr @@ -1,3 +1,3 @@ module Raven - VERSION = "1.5.3" + VERSION = "1.5.4" end