Method: Rightscale::HttpConnection#finish

Defined in:
lib/right_http_connection.rb

#finish(reason = '') ⇒ Object



531
532
533
534
535
536
537
538
539
# File 'lib/right_http_connection.rb', line 531

def finish(reason = '')
  if @http && @http.started?
    reason = ", reason: '#{reason}'" unless reason.empty?
    @logger.info("Closing #{@http.use_ssl? ? 'HTTPS' : 'HTTP'} connection to #{@http.address}:#{@http.port}#{reason}")
    @http.finish
  end
ensure
  @http = nil
end