def delete(stream)
      case stream_type(stream)
      when :client then
        return unless stream.connected?
        jid = stream.user.jid.bare
        streams = @clients[jid] || []
        streams.delete(stream)
        @clients.delete(jid) if streams.empty?
      when :server then @servers.delete(stream)
      when :component then @components.delete(stream)
      end
    end
def delete(stream)
      case stream_type(stream)
      when :client then
        return unless stream.connected?
        jid = stream.user.jid.bare
        streams = @clients[jid] || []
        streams.delete(stream)
        @clients.delete(jid) if streams.empty?
      when :server then @servers.delete(stream)
      when :component then @components.delete(stream)
      end
    end
Remove the connection from the routing table.