diff options
author | abcang <abcang1015@gmail.com> | 2017-10-14 21:38:57 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-14 14:38:57 +0200 |
commit | 2eab41cd1a38fd382a735f32c6ecba7ec193f6f2 (patch) | |
tree | d48bce55d3f908ab17848e4f7e415ae9d98982e4 /app/workers/pubsubhubbub | |
parent | c6f76db2e16decc1bc1483e616933f561d627c36 (diff) |
Close connection when succeeded posting (#5390)
* Close connection when succeeded posting * Update webmock
Diffstat (limited to 'app/workers/pubsubhubbub')
-rw-r--r-- | app/workers/pubsubhubbub/delivery_worker.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/workers/pubsubhubbub/delivery_worker.rb b/app/workers/pubsubhubbub/delivery_worker.rb index c3506727b..a9174edd2 100644 --- a/app/workers/pubsubhubbub/delivery_worker.rb +++ b/app/workers/pubsubhubbub/delivery_worker.rb @@ -27,6 +27,7 @@ class Pubsubhubbub::DeliveryWorker raise Mastodon::UnexpectedResponseError, payload_delivery unless response_successful? + payload_delivery.connection&.close subscription.touch(:last_successful_delivery_at) end @@ -37,7 +38,7 @@ class Pubsubhubbub::DeliveryWorker def callback_post_payload request = Request.new(:post, subscription.callback_url, body: payload) request.add_headers(headers) - request.perform.flush + request.perform end def blocked_domain? |