Skip to content

Commit

Permalink
Add comment explaining why we call a synchronous method
Browse files Browse the repository at this point in the history
... only from an asynchronous context.

Signed-off-by: Brian Upton <brian.upton@broadcom.com>
  • Loading branch information
aramprice committed Sep 17, 2024
1 parent 103b099 commit 4bd9d9d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bosh-monitor/lib/bosh/monitor/plugins/pagerduty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def process(event)

request[:proxy] = options['http_proxy'] if options['http_proxy']

# Note this appears to be the only use of `#send_http_post_request_synchronous_with_tls_verify_peer` from git
# history it appears that the previous asynchronous implementation (EventMachine) was not able to use
# TLS-proxies, so a synchronous call was made from asynchronously.
# This should probably be re-implemented to use the asynchronous `HttpRequestHelper#send_http_post_request`
# method _however_ that method should be updated to use `OpenSSL::SSL::VERIFY_PEER`.
Async do
send_http_post_request_synchronous_with_tls_verify_peer(API_URI, request)
rescue StandardError => e
Expand Down

0 comments on commit 4bd9d9d

Please sign in to comment.