lib/bunny/queue.rb in celldee-bunny-0.0.5 vs lib/bunny/queue.rb in celldee-bunny-0.0.6
- old
+ new
@@ -4,9 +4,12 @@
attr_reader :name, :client
attr_accessor :delivery_tag
def initialize(client, name, opts = {})
+ # check connection to server
+ raise 'Not connected to server' if client.status == NOT_CONNECTED
+
@client = client
@opts = opts
@name = name
client.send_frame(
Protocol::Queue::Declare.new({ :queue => name, :nowait => true }.merge(opts))
\ No newline at end of file