Sending ping to wrong domain

I have notice that in,

the sendKeepAlive does

var ping:IQ = new IQ(new EscapedJID(server), IQ.TYPE_GET);

should it do

var ping:IQ = new IQ(new EscapedJID(domain), IQ.TYPE_GET);

instead ?

I think the existing structure is correct.

Domain is extracted from the user’s full jid:

Whereas server is the actual server that the connection is made with. So for example, logging into Google Talk the user’s jid could be but the server would be

As it exists now, the ping would hit instead of, which would be correct.

From what I understand, a jabber server can bind on an IP address and DNS domain name.

However that server can also serve multiple virtual domain internally.

Then, clients can connect to a server and use a separate domain in their JID.

From this thread

I know, openfire does not support multiple virtual domains but other servers do.

So, I think, in XIFF, even if the client is sending the ping stanza to the server domain (eg:, it should specify in the stanza XML the domain (