Close connection when succeeded posting (#5390)
* Close connection when succeeded posting * Update webmock
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user