atmosphere
  1. atmosphere
  2. ATMOSPHERE-153

SimpleBroadcaster puts messages into the asyncWriteQueue but never starts the AsyncWriteHandler

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.7.2
    • Fix Version/s: 0.8
    • Component/s: runtime
    • Labels:
      None

      Description

      I have code like this:

      Broadcaster broadcaster = new JerseySimpleBroadcaster(...);
      
      return new SuspendResponse.SuspendResponseBuilder()
              .broadcaster(broadcaster)
              .addListener(...)
              .outputComments(false)
              .resumeOnBroadcast(true)
              .period(...)
              .build();
      

      Then later, my code manually invokves broadcaster.broadcast(msg) which is defined in SimpleBroadcaster. It in turn creates an entry and uses DefaultBroadcaster.push to put it in the asyncWriteQueue instance variable that the broadcaster inherited from DefaultBroadcaster.
      However, the runnable that takes these entries out of the asyncWriteQueue (DefaultBroadcaster.getAsyncWriteHandler) is never started (via DefaultBroadcaster.start), presumably because SimpleBroadcaster.broadcast does not invoke super.broadcast or start ?

      The net effect is that these messages are never sent.

        Activity

        Hide
        jfarcand added a comment -

        This has been fixed in 0.8-SNAPSHOT and logged as

        http://java.net/jira/browse/ATMOSPHERE-139

        Thanks!!

        Show
        jfarcand added a comment - This has been fixed in 0.8-SNAPSHOT and logged as http://java.net/jira/browse/ATMOSPHERE-139 Thanks!!

          People

          • Assignee:
            Unassigned
            Reporter:
            tomdz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: