XMPPConnection.sendPacket() must be synchronized

Hi,

When we used to send 2 packets one by one then both the packets are discarted from the wildfire.

con.sendPacket(pack1);
con.sendPacket(pack2);

then both the packets are discarted by the wildfire

Regards,

Jitendra

Hey Jitendra,

Could you provide more information about the problem you are seeing and what are you doing in your code (e.g. code snippet to be able to reproduce the problem)? BTW, are you using the same Packet instance when sending the #sendPacket message? Are you modifying the instance between invocations? Or is it just a new packet?

Regards,

– Gato

Hi,

I think I have a similar problem.

I’'m trying to send packets in a loop:

Message message = buildNewMessage(…)

for (int i = 10 ; i < 10 ; i++)
{
message.setTo(jabberusername);
this.conn.sendPacket(message);
//TODO - find out why we needed to add the “wait()” call wait(1);
}

It does not seem to work without the wait(1) call

any ideas?

do I need to synchronize the sendPacket method?

Best Regards,

Kobi