{"action":"created","issue":{"url":"https://api.github.com/repos/nkzawa/socket.io-android-chat/issues/22","labels_url":"https://api.github.com/repos/nkzawa/socket.io-android-chat/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/nkzawa/socket.io-android-chat/issues/22/comments","events_url":"https://api.github.com/repos/nkzawa/socket.io-android-chat/issues/22/events","html_url":"https://github.com/nkzawa/socket.io-android-chat/issues/22","id":109497306,"number":22,"title":"There's no ability to change conneting url to server(or option value)","user":{"login":"Zo2m4bie","id":4004436,"avatar_url":"https://avatars.githubusercontent.com/u/4004436?v=3","gravatar_id":"","url":"https://api.github.com/users/Zo2m4bie","html_url":"https://github.com/Zo2m4bie","followers_url":"https://api.github.com/users/Zo2m4bie/followers","following_url":"https://api.github.com/users/Zo2m4bie/following{/other_user}","gists_url":"https://api.github.com/users/Zo2m4bie/gists{/gist_id}","starred_url":"https://api.github.com/users/Zo2m4bie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zo2m4bie/subscriptions","organizations_url":"https://api.github.com/users/Zo2m4bie/orgs","repos_url":"https://api.github.com/users/Zo2m4bie/repos","events_url":"https://api.github.com/users/Zo2m4bie/events{/privacy}","received_events_url":"https://api.github.com/users/Zo2m4bie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-02T14:06:19Z","updated_at":"2015-10-02T14:40:51Z","closed_at":"2015-10-02T14:40:50Z","body":"Hello. In my app I have next steps to connect to server.\r\n1) Send REST query to get token\r\n2) Connect to socket server with this token. I do it via below code:\r\n\r\n            IO.Options options = new IO.Options();\r\n            options.query = \"token=\" + mToken;\r\n            socket = IO.socket(URI.create(pathSocket), options);\r\n            ... connect listeners\r\n            socket.connect();\r\n\r\n3) When socket connecting received, socket-server send to app that credential is correct/incorrect or other event.\r\n\r\nProblem happens when user inputs incorrect credential at first time.\r\nSteps:\r\n1) User input some credential. REST sends token. After that app tried to connect to socket-server. App receive on connected, but since it's wrong account for current device user receives error in callback. After that app disconnects from socket-server and show error to user.\r\n\r\n2) User input other credential. REST sends new token.  After that app tries to connect to socket server(code which I wrote in second point). In this case I receive error too, like with wrong credential. I investigated this problem, and I used through WireShark to watch my traffic while app connects to socket server.  And I have seen that although app set new token in option class, it connects with old one (which I received with wrong credential).\r\n\r\nIt can be fixed if user exit from app and launch it again\r\n "},"comment":{"url":"https://api.github.com/repos/nkzawa/socket.io-android-chat/issues/comments/145043296","html_url":"https://github.com/nkzawa/socket.io-android-chat/issues/22#issuecomment-145043296","issue_url":"https://api.github.com/repos/nkzawa/socket.io-android-chat/issues/22","id":145043296,"user":{"login":"Zo2m4bie","id":4004436,"avatar_url":"https://avatars.githubusercontent.com/u/4004436?v=3","gravatar_id":"","url":"https://api.github.com/users/Zo2m4bie","html_url":"https://github.com/Zo2m4bie","followers_url":"https://api.github.com/users/Zo2m4bie/followers","following_url":"https://api.github.com/users/Zo2m4bie/following{/other_user}","gists_url":"https://api.github.com/users/Zo2m4bie/gists{/gist_id}","starred_url":"https://api.github.com/users/Zo2m4bie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zo2m4bie/subscriptions","organizations_url":"https://api.github.com/users/Zo2m4bie/orgs","repos_url":"https://api.github.com/users/Zo2m4bie/repos","events_url":"https://api.github.com/users/Zo2m4bie/events{/privacy}","received_events_url":"https://api.github.com/users/Zo2m4bie/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T14:40:50Z","updated_at":"2015-10-02T14:40:50Z","body":"Sorry, it's for another project"}}