0
0
Fork 0

Close connection when succeeded posting (#5390)

* Close connection when succeeded posting

* Update webmock
This commit is contained in:
abcang 2017-10-14 21:38:57 +09:00 committed by Eugen Rochko
parent c6f76db2e1
commit 2eab41cd1a
6 changed files with 13 additions and 7 deletions

View file

@ -16,6 +16,7 @@ class ActivityPub::DeliveryWorker
raise Mastodon::UnexpectedResponseError, @response unless response_successful?
@response.connection&.close
failure_tracker.track_success!
rescue => e
failure_tracker.track_failure!
@ -31,7 +32,7 @@ class ActivityPub::DeliveryWorker
end
def perform_request
@response = build_request.perform.flush
@response = build_request.perform
end
def response_successful?