Projects tigase _server server-core Issues #274
Bosh issue: message could only be send one way (#274)
Matthew M opened 1 decade ago

We are using 5.2.0-beta3. We have a strange problem with BOSH connection. When a BOSH user is connected and sending message to others, sometime, this user enters a strange state: the user can send message to others, but can NOT receive any message from others.

After spending sometime tracing into the code, we found something interesting. Sometime, there is a valid BoshIOService for a Bosh user, therefore the message from this user is received by Tigase and forwarded to the buddy. But the "XMPP Session" does not exists any more. Then the rely from the buddy can never be forwarded to this bosh user any more.

To verify our thoughts, we change the code a bit just to catch this kind event -- and we found a few logs in the system. Although there are not many, but it does affect some of our users.

Do you have any idea about this?

BoshSession.java:

   public synchronized void processSocketPacket(Packet packet, BoshIOService service,
    Queue<Packet> out_results) {

        // we add some debugging code here
        SessionManager sessMan = (SessionManager) XMPPServer.getComponent("sess-man");
        XMPPSession xsession = sessMan.getSessionsByNodeId().get(this.userJid.getBareJID());
        if (xsession.getResourceConnection(this.userJid) ==null) 
              System.out.println("Found a bosh connection that has no XMPP session, this user will never receive any packets?");

       //original code ....
        ....
    }

Reference: https://projects.tigase.org/boards/4/topics/1058

Andrzej Wójcik (Tigase) commented 1 decade ago

From what is described I suppose that session was removed from map which used user bare jid as a key but session was still kept in map which used connection id as a key. I identified place in code which could lead to this situation and fixed it. Code was very similar to code which was responsible for very similar state and which was fixed not so long ago.

issue 1 of 1
Type
Bug
Priority
Blocker
Assignee
RedmineID
1695
Spent time
12h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#274
Please wait...
Page is in error, reload to recover