Opened 12 years ago

Closed 12 years ago

#5215 closed enhancement (fixed)

Cometd backoff reconnections and handshakes

Reported by: gregwilkins Owned by: gregwilkins
Priority: high Milestone:
Component: Dojox Version: 1.0
Keywords: cometd Cc: alex
Blocked By: Blocking:

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 (2)

chat.patch (1.7 KB) - added by gregwilkins 12 years ago.
chat patch
cometd.patch (18.0 KB) - added by gregwilkins 12 years ago.
updated cometd patch

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by gregwilkins

Attachment: chat.patch added

chat patch

comment:1 Changed 12 years ago by alex

Cc: alex added

comment:2 Changed 12 years ago by gregwilkins

Summary: Cometd backed offed reconnections and handshakesCometd backoff reconnections and handshakes

Changed 12 years ago by gregwilkins

Attachment: cometd.patch added

updated cometd patch

comment:3 Changed 12 years ago by gregwilkins

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

comment:4 Changed 12 years ago by gregwilkins

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.