Ticket #5215 (closed enhancement: fixed)
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