# File lib/stomp_server/queue_manager.rb, line 148
  def disconnect(connection)
    puts "Disconnecting"
    frame = @pending[connection]
    if frame
      @qstore.requeue(frame.headers['destination'],frame)
      @pending.delete connection
    end

    @queues.each do |dest, queue|
      queue.delete_if { |qu| qu.connection == connection }
      @queues.delete(dest) if queue.empty?
    end
  end