{"issue":{"state":"open","created_at":"2011-11-28T22:29:51Z","updated_at":"2011-11-28T23:05:52Z","user":{"gravatar_id":"b8c9f46a87c9d2244bcd318e87870da1","id":372063,"url":"https://api.github.com/users/haed","avatar_url":"https://secure.gravatar.com/avatar/b8c9f46a87c9d2244bcd318e87870da1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"haed"},"comments":1,"body":"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.\r\n\r\nThis results in more and more open connections to the server. A re-connect should be triggered on long-polling on readyState==4 only.\r\n\r\nCan be tested with haed.notification (app1, send 100 messages). Workaround in haed.notification: The server-side logic rejects all multiple connections (see: NotificationAPI:80).\r\n\r\nEnvironment: Mac, Chrome, Jetty, Jersey, long-polling, jQuery 1.7.2","assignee":null,"id":2374323,"number":87,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"too many connections on long-polling and readyState==3","closed_at":null,"html_url":"https://github.com/Atmosphere/atmosphere/issues/87","url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/87","milestone":null},"action":"created","comment":{"created_at":"2011-11-28T23:05:52Z","updated_at":"2011-11-28T23:05:52Z","user":{"gravatar_id":"b8c9f46a87c9d2244bcd318e87870da1","id":372063,"url":"https://api.github.com/users/haed","avatar_url":"https://secure.gravatar.com/avatar/b8c9f46a87c9d2244bcd318e87870da1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"haed"},"body":"This issue is critical for us, because our webapp should run without any reloads (simply gets notified by atmosphere), but on bigger load there are more and more atmosphere connections (which also blocks requests and results in illegal states).","id":2909092,"url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/comments/2909092"}}