Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14047

Jabber discards messages when stream gets closed without waiting for acknowledgement

    XMLWordPrintable

Details

    Description

      My jabber server (https://prosody.im/) refuses to speak with my phpBB-3.1.5 installation unless I add a

      usleep(1000);

      to the sending part: link

      After some investigation, I found the following;

      The notification code is calling send_message() to send a message to the client. Immediately after this happened, phpbb calls disconnect on the connection.

      The problem we have now, is that we don't wait for the jabber server to acknowledge the stream closing, but rather shutdown the socket immediately. If the jabber server did not send the message yet, it will get discarded as the client connection has been terminated.

      What should happen is to wait for the server to respond with </stream:stream> before shutting down.

      See XEP-0190 superseeded by RFC 6120 4.4

      My dirty solution is to put a $this->listen(); here. This could lead to problems if phpbb receives a random message as it doesnt validate thats its actually a stream closing event.

      Attachments

        Activity

          People

            Marc Marc
            kiu112 kiu112 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: