{"action":"created","issue":{"url":"https://api.github.com/repos/koush/AndroidAsync/issues/310","labels_url":"https://api.github.com/repos/koush/AndroidAsync/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/koush/AndroidAsync/issues/310/comments","events_url":"https://api.github.com/repos/koush/AndroidAsync/issues/310/events","html_url":"https://github.com/koush/AndroidAsync/issues/310","id":55041178,"number":310,"title":"AsyncServer deadlock","user":{"login":"oasalonen","id":1109816,"avatar_url":"https://avatars.githubusercontent.com/u/1109816?v=3","gravatar_id":"","url":"https://api.github.com/users/oasalonen","html_url":"https://github.com/oasalonen","followers_url":"https://api.github.com/users/oasalonen/followers","following_url":"https://api.github.com/users/oasalonen/following{/other_user}","gists_url":"https://api.github.com/users/oasalonen/gists{/gist_id}","starred_url":"https://api.github.com/users/oasalonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oasalonen/subscriptions","organizations_url":"https://api.github.com/users/oasalonen/orgs","repos_url":"https://api.github.com/users/oasalonen/repos","events_url":"https://api.github.com/users/oasalonen/events{/privacy}","received_events_url":"https://api.github.com/users/oasalonen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-21T16:25:48Z","updated_at":"2015-01-23T00:12:31Z","closed_at":null,"body":"Hi,\r\n\r\nI have a problem where the semaphore in AsyncServer.run(Runnable) is not released. I can reproduce it 100% with the latest jar from maven and with the master branch (commit 8777610).\r\n\r\nI have a really simple setup where I listen to an incoming WebSocket connection, then flood it with send() requests about once every 50 ms. So far I've only run it on the Android emulator. In any case, after about 2-3 seconds, everything hangs. And I tracked it to a thread waiting for semaphore.acquire() in AsyncServer.java line 199. I didn't have time at least yet to look any further to see why it doesn't get released.\r\n\r\nAny ideas why this is happening?"},"comment":{"url":"https://api.github.com/repos/koush/AndroidAsync/issues/comments/71125827","html_url":"https://github.com/koush/AndroidAsync/issues/310#issuecomment-71125827","issue_url":"https://api.github.com/repos/koush/AndroidAsync/issues/310","id":71125827,"user":{"login":"andrepew","id":2948899,"avatar_url":"https://avatars.githubusercontent.com/u/2948899?v=3","gravatar_id":"","url":"https://api.github.com/users/andrepew","html_url":"https://github.com/andrepew","followers_url":"https://api.github.com/users/andrepew/followers","following_url":"https://api.github.com/users/andrepew/following{/other_user}","gists_url":"https://api.github.com/users/andrepew/gists{/gist_id}","starred_url":"https://api.github.com/users/andrepew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrepew/subscriptions","organizations_url":"https://api.github.com/users/andrepew/orgs","repos_url":"https://api.github.com/users/andrepew/repos","events_url":"https://api.github.com/users/andrepew/events{/privacy}","received_events_url":"https://api.github.com/users/andrepew/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T00:12:31Z","updated_at":"2015-01-23T00:12:31Z","body":"I have the same issue and am experiencing it on an actual device. \r\n\r\nI've connected with wss to my node.js websocket server and spam send() to it using AndroidAsync as the client. 99% of the time it will deadlock on AsyncServer line 199."}}