Sha256: 588750d04a9a0d1bbeb32b03c72d1199029ffaf2aa151e3539dc21c7293eb46e

Contents?: true

Size: 368 Bytes

Versions: 1

Compression:

Stored size: 368 Bytes

Contents

require 'bunny'

module Bunny
  class Session
    def cleanup_threads
      log_errors { self.maybe_shutdown_heartbeat_sender }
      log_errors { self.maybe_shutdown_reader_loop }
      log_errors { self.close_transport }
    end

    def log_errors
      begin
        yield
      rescue => e
        @logger.info "#{e.class}: #{e.to_s}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
message-driver-0.2.2 lib/bunny/session_patch.rb