{"action":"created","issue":{"url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/44","repository_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client","labels_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/44/comments","events_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/44/events","html_url":"https://github.com/TakahikoKawasaki/nv-websocket-client/issues/44","id":142154524,"number":44,"title":"Proper way of send error handling","user":{"login":"maciej-miszczak","id":17859710,"avatar_url":"https://avatars.githubusercontent.com/u/17859710?v=3","gravatar_id":"","url":"https://api.github.com/users/maciej-miszczak","html_url":"https://github.com/maciej-miszczak","followers_url":"https://api.github.com/users/maciej-miszczak/followers","following_url":"https://api.github.com/users/maciej-miszczak/following{/other_user}","gists_url":"https://api.github.com/users/maciej-miszczak/gists{/gist_id}","starred_url":"https://api.github.com/users/maciej-miszczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciej-miszczak/subscriptions","organizations_url":"https://api.github.com/users/maciej-miszczak/orgs","repos_url":"https://api.github.com/users/maciej-miszczak/repos","events_url":"https://api.github.com/users/maciej-miszczak/events{/privacy}","received_events_url":"https://api.github.com/users/maciej-miszczak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-03-20T11:32:24Z","updated_at":"2016-10-07T12:01:53Z","closed_at":null,"body":"Hello,\r\n\r\nit's not clear for me how to handle send errors correctly. In my Service I create an AsyncTask, which handles ArrayBlockingQueue in a loop. Then I run connectAsynchronously() in this service. Into the mentioned queue I add messages I want to send. As far as I understand, sendText() returns even in case of an error - the onSendError() callback is then called, but all the code after sendText() invocation is executed. How can I then implement some way to buffer my data in a database in case of transmission problems? I tried to save the data in a database in onSendError() or onFrameUnsent() and clear the queue head in onFrameSent(), but it appears, that onFrameSent() is executed also after a ping frame, so I would probably have to check the queue head for the getPayloadText() of a sent frame. Am I right?\r\n\r\nCheers,\r\nMatthew"},"comment":{"url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/comments/252235233","html_url":"https://github.com/TakahikoKawasaki/nv-websocket-client/issues/44#issuecomment-252235233","issue_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/44","id":252235233,"user":{"login":"eku","id":418685,"avatar_url":"https://avatars.githubusercontent.com/u/418685?v=3","gravatar_id":"","url":"https://api.github.com/users/eku","html_url":"https://github.com/eku","followers_url":"https://api.github.com/users/eku/followers","following_url":"https://api.github.com/users/eku/following{/other_user}","gists_url":"https://api.github.com/users/eku/gists{/gist_id}","starred_url":"https://api.github.com/users/eku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eku/subscriptions","organizations_url":"https://api.github.com/users/eku/orgs","repos_url":"https://api.github.com/users/eku/repos","events_url":"https://api.github.com/users/eku/events{/privacy}","received_events_url":"https://api.github.com/users/eku/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T12:01:53Z","updated_at":"2016-10-07T12:01:53Z","body":"@BoD this websocket implementation works asynchroniously. Blocking network calls are a bad way."}}
{"actor":{"display_login":"eku"}}