Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-333

client bus chokes on true transport errors

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.Final, 2.0.1.Final
    • Fix Version/s: 2.1.0.Beta1
    • Component/s: ErraiBus
    • Labels:
      None

      Description

      If a client bus's poll request fails due to a transport error, or anything
      that doesn't result in receiving an HTTP response, the bus hangs.

      The problem is in ClientMessageBusImpl.LongPollRequestCallback.onError().
      The onError() method has a short-circuit return when statusCode is zero,
      but statusCode can only become non-zero if the request has completed
      successfully and a valid HTTP response has been received from the server.
      Thus, with some irony, onError() does not actually handle Request errors:
      it only does work when called by onResponseReceived().

      Since onError() short-circuits, no bus errors are broadcast on the local
      bus and no reconnect attempt is scheduled. The net result is that polling
      is dead and the client bus receives no more messages from the server.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  cbrock Mike Brock
                  Reporter:
                  almac Alvin McMurdy
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: