Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't assume routing key is always present

  • Loading branch information...
commit 044adbbd8877d591520d5933cbd59fe2f63b9585 1 parent a8825e2
Michael Klishin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bunny/channel.rb
View
2  lib/bunny/channel.rb
@@ -517,7 +517,7 @@ def nack(delivery_tag, multiple = false, requeue = false)
# @api public
def basic_publish(payload, exchange, routing_key, opts = {})
raise_if_no_longer_open!
- raise ArgumentError, "routing key cannot be longer than #{SHORTSTR_LIMIT} characters" if routing_key.size > SHORTSTR_LIMIT
+ raise ArgumentError, "routing key cannot be longer than #{SHORTSTR_LIMIT} characters" if routing_key && routing_key.size > SHORTSTR_LIMIT
exchange_name = if exchange.respond_to?(:name)
exchange.name
Please sign in to comment.
Something went wrong with that request. Please try again.