def return_pending(key)
      @pending[key].each do |stanza|
        to, from = JID.new(stanza['to']), JID.new(stanza['from'])
        xml = StanzaErrors::RemoteServerNotFound.new(stanza, 'cancel').to_xml
        if @config.component?(from)
          connection_to(from, to).write(xml) rescue nil
        else
          connected_resources(from, to).each {|c| c.write(xml) }
        end
      end
    end
def return_pending(key)
      @pending[key].each do |stanza|
        to, from = JID.new(stanza['to']), JID.new(stanza['from'])
        xml = StanzaErrors::RemoteServerNotFound.new(stanza, 'cancel').to_xml
        if @config.component?(from)
          connection_to(from, to).write(xml) rescue nil
        else
          connected_resources(from, to).each {|c| c.write(xml) }
        end
      end
    end
Return all pending stanzas to their senders as remote-server-not-found
 errors. Called after a s2s stream has failed to connect.