lib/amq/protocol/client.rb in amq-protocol-1.0.0.pre5 vs lib/amq/protocol/client.rb in amq-protocol-1.0.0.pre6
- old
+ new
@@ -11,11 +11,10 @@
module AMQ
module Protocol
PROTOCOL_VERSION = "0.9.1".freeze
PREAMBLE = "AMQP\x00\x00\x09\x01".freeze
DEFAULT_PORT = 5672
- TLS_PORT = 5671
# caching
EMPTY_STRING = "".freeze
PACK_CHAR = 'C'.freeze
@@ -1466,11 +1465,11 @@
def self.encode_properties(body_size, properties)
pieces, flags = [], 0
- properties.each do |key, value|
- i, f, result = self.send(:"encode_#{key}", value)
+ properties.reject {|key, value| value.nil?}.each do |key, value|
+ i, f, result = self.__send__(:"encode_#{key}", value)
flags |= f
pieces[i] = result
end
# result = [60, 0, body_size, flags].pack('n2Qn')