Method: Logtail::LogDevices::HTTP#close

Defined in:
lib/logtail/log_devices/http.rb

#closeObject

Closes the log device, cleans up, and attempts one last delivery.



117
118
119
120
121
122
123
124
125
126
# File 'lib/logtail/log_devices/http.rb', line 117

def close
  # Kill the flush thread immediately since we are about to flush again.
  @flush_thread.kill if @flush_thread

  # Flush all remaining messages
  flush

  # Kill the request queue thread. Flushing ensures that no requests are pending.
  @request_outlet_thread.kill if @request_outlet_thread
end