Atmosphere/atmosphere — Issue #87: too many connections on long-polling and readyState==3
Author: haed
Created: 2011-11-28 22:29:51+00:00
State: open

On long-polling the atmosphere-client re-connects too often to server. If the server send chunked text (triggers multiple ajaxRequest.onreadystatechange invocation with readyState == 3) the client start a re-connect (update will be set to true in line 221), but this connection stays opened.

This results in more and more open connections to the server. A re-connect should be triggered on long-polling on readyState==4 only.

Can be tested with haed.notification (app1, send 100 messages). Workaround in haed.notification: The server-side logic rejects all multiple connections (see: NotificationAPI:80).

Environment: Mac, Chrome, Jetty, Jersey, long-polling, jQuery 1.7.2