about summary refs log tree commit diff
path: root/app/services/unsubscribe_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/unsubscribe_service.rb')
-rw-r--r--app/services/unsubscribe_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/unsubscribe_service.rb b/app/services/unsubscribe_service.rb
index d84a5a530..01f5c6b7a 100644
--- a/app/services/unsubscribe_service.rb
+++ b/app/services/unsubscribe_service.rb
@@ -7,9 +7,10 @@ class UnsubscribeService < BaseService
     @account = account
 
     begin
-      @response = build_request.perform.flush
+      @response = build_request.perform
 
       Rails.logger.debug "PuSH unsubscribe for #{@account.acct} failed: #{@response.status}" unless @response.status.success?
+      @response.connection&.close
     rescue HTTP::Error, OpenSSL::SSL::SSLError => e
       Rails.logger.debug "PuSH unsubscribe for #{@account.acct} failed: #{e}"
     end