diff --git a/spec/mqtt/integrations/unsubscribe_spec.cr b/spec/mqtt/integrations/unsubscribe_spec.cr index be3e19148..13dd813fc 100644 --- a/spec/mqtt/integrations/unsubscribe_spec.cr +++ b/spec/mqtt/integrations/unsubscribe_spec.cr @@ -53,13 +53,11 @@ module MqttSpecs subscribe(io, topic_filters: topics) disconnect(io) end - pp "first consumers: #{server.vhosts["/"].queues["amq.mqtt-client_id"].consumers}" + sleep 1 # Publish messages that will be stored for the subscriber 2.times { |i| publish(pubio, topic: "a/b", payload: i.to_s.to_slice, qos: 0u8) } - pp "first msg count: #{server.vhosts["/"].queues["amq.mqtt-client_id"].message_count}" - # Let the subscriber connect and read the messages, but don't ack. Then unsubscribe. # We must read the Publish packets before unsubscribe, else the "suback" will be stuck. with_client_io(server) do |io| @@ -73,8 +71,7 @@ module MqttSpecs unsubscribe(io, topics: ["a/b"]) disconnect(io) end - pp "second msg count: #{server.vhosts["/"].queues["amq.mqtt-client_id"].message_count}" - pp "unacked msgs: #{server.vhosts["/"].queues["amq.mqtt-client_id"].unacked_count}" + sleep 1 # Publish more messages 2.times { |i| publish(pubio, topic: "a/b", payload: (2 + i).to_s.to_slice, qos: 0u8) } diff --git a/src/lavinmq/mqtt/client.cr b/src/lavinmq/mqtt/client.cr index 38fe5fa12..1ad0a3773 100644 --- a/src/lavinmq/mqtt/client.cr +++ b/src/lavinmq/mqtt/client.cr @@ -181,7 +181,6 @@ module LavinMQ end def deliver(msg, sp, redelivered = false, recover = false) - pp "Delivering message: #{msg.inspect}" packet_id = nil if message_id = msg.properties.message_id packet_id = message_id.to_u16 unless message_id.empty?