Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Packet collector freeze

$
0
0

Hi,

 

I am experience an issue while using packet collector to receive the response for a XMPP request. When the sever responds with an error resposne(as per openfire logs) for the request, the response seems to be null. Hence I am throwing an XMPP exception.

 

 

             PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(myRequest.getPacketID()));

            connection.sendPacket(myRequest);

            MyPacket myResponse = (MyPacket)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());

            collector.cancel();

 

            if (myResponse== null) {

                throw new XMPPException("Server timed out");

            }

            if (myResponse.getType() == IQ.Type.ERROR) {

                throw new XMPPException("Error getting your response", myResponse.getError());

            }

 

After this point smack isnt receving any packet that is coming from openfire. I am puzzled on the behaviour and left with no clue.

 

Please help me here.


Viewing all articles
Browse latest Browse all 10742

Trending Articles