{"action":"created","issue":{"url":"https://api.github.com/repos/ptaoussanis/sente/issues/150","labels_url":"https://api.github.com/repos/ptaoussanis/sente/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/ptaoussanis/sente/issues/150/comments","events_url":"https://api.github.com/repos/ptaoussanis/sente/issues/150/events","html_url":"https://github.com/ptaoussanis/sente/issues/150","id":97104643,"number":150,"title":"Connection Leak","user":{"login":"bdollard","id":580967,"avatar_url":"https://avatars.githubusercontent.com/u/580967?v=3","gravatar_id":"","url":"https://api.github.com/users/bdollard","html_url":"https://github.com/bdollard","followers_url":"https://api.github.com/users/bdollard/followers","following_url":"https://api.github.com/users/bdollard/following{/other_user}","gists_url":"https://api.github.com/users/bdollard/gists{/gist_id}","starred_url":"https://api.github.com/users/bdollard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdollard/subscriptions","organizations_url":"https://api.github.com/users/bdollard/orgs","repos_url":"https://api.github.com/users/bdollard/repos","events_url":"https://api.github.com/users/bdollard/events{/privacy}","received_events_url":"https://api.github.com/users/bdollard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-24T18:00:59Z","updated_at":"2015-07-24T21:31:03Z","closed_at":null,"body":"I've found a connection leak when using sente with Immutant in AJAX mode. I'm not sure if it is a sente bug or an immutant bug.\r\n\r\nStep to reproduce.\r\n\r\n1. Clone https://github.com/bdollard/sente  (this has just been modified to use immutant and ajax and disable broadcasting) and run the example project \r\n2. leave the browser window open and and observe the number of connections in CLOSE_WAIT status gradually grow as longpolling connections time out.  \r\n\r\nEventually the open files limit can be reached, making the server non-responsive.  I did a little debugging, and it looks like  [on-close handler] (https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente/server_adapters/immutant.clj#L22-L24) is not getting called for connections that time out. \r\nThis may be the cause of #146 "},"comment":{"url":"https://api.github.com/repos/ptaoussanis/sente/issues/comments/124731443","html_url":"https://github.com/ptaoussanis/sente/issues/150#issuecomment-124731443","issue_url":"https://api.github.com/repos/ptaoussanis/sente/issues/150","id":124731443,"user":{"login":"tobias","id":2631,"avatar_url":"https://avatars.githubusercontent.com/u/2631?v=3","gravatar_id":"","url":"https://api.github.com/users/tobias","html_url":"https://github.com/tobias","followers_url":"https://api.github.com/users/tobias/followers","following_url":"https://api.github.com/users/tobias/following{/other_user}","gists_url":"https://api.github.com/users/tobias/gists{/gist_id}","starred_url":"https://api.github.com/users/tobias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobias/subscriptions","organizations_url":"https://api.github.com/users/tobias/orgs","repos_url":"https://api.github.com/users/tobias/repos","events_url":"https://api.github.com/users/tobias/events{/privacy}","received_events_url":"https://api.github.com/users/tobias/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T21:31:03Z","updated_at":"2015-07-24T21:31:03Z","body":"I can recreate the issue with your example, even with 2.0.2. This is most likely a bug in Immutant itself, not Sente. I created https://issues.jboss.org/browse/IMMUTANT-572 to track it there, and can take a look on Monday. If the fix is fairly straightforward, I should be able to release 2.0.3 pretty quickly."}}