Ticket #5215 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

Cometd backoff reconnections and handshakes

Reported by: gregwilkins Owned by: gregwilkins
Priority: normal Milestone:
Component: Dojox Version: 1.0
Severity: normal Keywords: cometd
Cc: alex

Description

The bayeux spec now says that a client should retry failed handshakes and connections using the advice and a backed off reconnect interval.

The patch supplied implements this, as well as a /cometd/meta local topic that users can subscribe to and receive state information. The chat demo has been patched to use this to resubscribe over server restarts - it also can handle network failures as well.

The patch also tidies up the code a fair bit and adds comments to the public methods, which have been moved to the top of the file. The hitch method has been used in more places where appropriate and some more _ naming has been applied. A bug with disconnect has also been fixed that left the dojo topic subscribed.

I'll commit the patch if I receive some positive feedback

Attachments

chat.patch (1.7 kB) - added by gregwilkins 9 months ago.
chat patch
cometd.patch (18.0 kB) - added by gregwilkins 9 months ago.
updated cometd patch

Change History

Changed 9 months ago by gregwilkins

chat patch

Changed 9 months ago by alex

  • cc alex added

Changed 9 months ago by gregwilkins

  • summary changed from Cometd backed offed reconnections and handshakes to Cometd backoff reconnections and handshakes

Changed 9 months ago by gregwilkins

updated cometd patch

Changed 9 months ago by gregwilkins

I have committed an additional fix that prevents delayed connects and handshakes skipping over a disconnect call.

Changed 9 months ago by gregwilkins

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.