Some times packetListener and MUC listener lost

Hi All,

Using Smack applet (web) with Ejabberd Server.

The below described issue comes very rare (2 out of 10) but very critical for application using it and also could not find any pattern or re-producible steps.

After successful login to jabber server by User A and receiving/sending the packets properly, after some time, its stop receiving any packets from server and also not any exception/error throw at java consol. Interesting point is, User A can send packets to others and other users are receiving the packets properly from User A i.e. User A has connection with jabber server and at server end User A status is online.

Code which I am using to make connection with server and then adding packet listener

**
**

** ConnectionConfiguration conf = new ConnectionConfiguration(this.jServerAddress, this.jServerPort);
conf.setReconnectionAllowed(true);
conf.setSASLAuthenticationEnabled(true);
connection = new XMPPConnection(conf);
connection.connect();
connection.addConnectionListener(new XMPPConListener(this));

       PacketFilter filter = new PacketFilter(){
             public boolean accept(Packet packet) {
                 if (packet instanceof Presence) {
                     return true;
                 }
                 return false;
             }
         };                   
         mainPacketList = new MainPacketListener(this);
           connection.addPacketListener(mainPacketList, filter);**

Please help in sorting out this issue.

Regards,

Kamal