{"action":"created","issue":{"url":"https://api.github.com/repos/01org/zephyr.js/issues/1385","repository_url":"https://api.github.com/repos/01org/zephyr.js","labels_url":"https://api.github.com/repos/01org/zephyr.js/issues/1385/labels{/name}","comments_url":"https://api.github.com/repos/01org/zephyr.js/issues/1385/comments","events_url":"https://api.github.com/repos/01org/zephyr.js/issues/1385/events","html_url":"https://github.com/01org/zephyr.js/issues/1385","id":244557611,"number":1385,"title":"[ws] If disconnect ws connection, you will never create a new connection","user":{"login":"cuiyanx","id":22387607,"avatar_url":"https://avatars2.githubusercontent.com/u/22387607?v=4","gravatar_id":"","url":"https://api.github.com/users/cuiyanx","html_url":"https://github.com/cuiyanx","followers_url":"https://api.github.com/users/cuiyanx/followers","following_url":"https://api.github.com/users/cuiyanx/following{/other_user}","gists_url":"https://api.github.com/users/cuiyanx/gists{/gist_id}","starred_url":"https://api.github.com/users/cuiyanx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuiyanx/subscriptions","organizations_url":"https://api.github.com/users/cuiyanx/orgs","repos_url":"https://api.github.com/users/cuiyanx/repos","events_url":"https://api.github.com/users/cuiyanx/events{/privacy}","received_events_url":"https://api.github.com/users/cuiyanx/received_events","type":"User","site_admin":false},"labels":[{"id":395838100,"url":"https://api.github.com/repos/01org/zephyr.js/labels/bug","name":"bug","color":"ee0701","default":true},{"id":494952343,"url":"https://api.github.com/repos/01org/zephyr.js/labels/P1","name":"P1","color":"dd0000","default":false}],"state":"open","locked":false,"assignee":{"login":"brianjjones","id":725841,"avatar_url":"https://avatars1.githubusercontent.com/u/725841?v=4","gravatar_id":"","url":"https://api.github.com/users/brianjjones","html_url":"https://github.com/brianjjones","followers_url":"https://api.github.com/users/brianjjones/followers","following_url":"https://api.github.com/users/brianjjones/following{/other_user}","gists_url":"https://api.github.com/users/brianjjones/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjjones/subscriptions","organizations_url":"https://api.github.com/users/brianjjones/orgs","repos_url":"https://api.github.com/users/brianjjones/repos","events_url":"https://api.github.com/users/brianjjones/events{/privacy}","received_events_url":"https://api.github.com/users/brianjjones/received_events","type":"User","site_admin":false},"assignees":[{"login":"brianjjones","id":725841,"avatar_url":"https://avatars1.githubusercontent.com/u/725841?v=4","gravatar_id":"","url":"https://api.github.com/users/brianjjones","html_url":"https://github.com/brianjjones","followers_url":"https://api.github.com/users/brianjjones/followers","following_url":"https://api.github.com/users/brianjjones/following{/other_user}","gists_url":"https://api.github.com/users/brianjjones/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjjones/subscriptions","organizations_url":"https://api.github.com/users/brianjjones/orgs","repos_url":"https://api.github.com/users/brianjjones/repos","events_url":"https://api.github.com/users/brianjjones/events{/privacy}","received_events_url":"https://api.github.com/users/brianjjones/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-07-21T03:53:23Z","updated_at":"2017-08-04T23:25:24Z","closed_at":null,"body":"### Description\r\n\r\n<!-- Shortly describe your issue. -->\r\nI disconnect ws connection and will re-connect, but ws server and client look like be hang. So I close ws client and get an error.\r\n \r\n\r\n### Test Code\r\n\r\n<!-- List the impacted test cases or sources code here. For example: -->\r\n\r\n[/samples/websockets/WebSocketServer.js](https://github.com/01org/zephyr.js/blob/master/samples/websockets/WebSocketServer.js)\r\n[/samples/websockets/NodeWebSocketClient.js](https://github.com/01org/zephyr.js/blob/master/samples/websockets/NodeWebSocketClient.js)\r\n\r\n \r\n\r\n### Steps to Reproduction\r\n\r\n<!-- Describe the exact steps how to reproduce the issue(if any precondition for this issue, please make sure put them firstly). -->\r\n1. Run WebSocketServer.js on a101\r\n2. Run NodeWebSocketClient.js on linux\r\n3. Disconnect this ws connection\r\n4. Re-connect ws connection\r\n5. Close ws client\r\n6. Check log info.\r\n \r\n\r\n### Actual Result\r\n\r\n<!-- Describe the actual behavior you get. -->\r\nError info:\r\n```\r\n src/zjs_event.c:358 zjs_trigger_event():\r\n(ERROR) callback_id not found\r\n```\r\n\r\n\r\n### Expected Result\r\n\r\n<!-- Describe what the behavior would be without the issue. -->\r\n\r\n Work well and can be re-connected.\r\n\r\n### Test Builds\r\n\r\n<!-- Include GitHub branch, commit id, target device, test date and result. If the result is fail, please use 'Fail', opposite is 'Pass',\r\n\r\n     and use 'Crash' for crash issue. More than one builds can be listed here for history reference. -->\r\n\r\nBranch | Commit Id | Target Device | Test Date | Result\r\n---|---|---|---|---\r\nmaster | 5c65f1102 | Arduino 101 | July 21, 2017 | Fail\r\n\r\n \r\n\r\n### Additional Information\r\n\r\n<!-- Specific test environments -->\r\n\r\n<!-- Error logs, screenshots for the failure phenomenon and pass screenshot. -->"},"comment":{"url":"https://api.github.com/repos/01org/zephyr.js/issues/comments/320373732","html_url":"https://github.com/01org/zephyr.js/issues/1385#issuecomment-320373732","issue_url":"https://api.github.com/repos/01org/zephyr.js/issues/1385","id":320373732,"user":{"login":"brianjjones","id":725841,"avatar_url":"https://avatars1.githubusercontent.com/u/725841?v=4","gravatar_id":"","url":"https://api.github.com/users/brianjjones","html_url":"https://github.com/brianjjones","followers_url":"https://api.github.com/users/brianjjones/followers","following_url":"https://api.github.com/users/brianjjones/following{/other_user}","gists_url":"https://api.github.com/users/brianjjones/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjjones/subscriptions","organizations_url":"https://api.github.com/users/brianjjones/orgs","repos_url":"https://api.github.com/users/brianjjones/repos","events_url":"https://api.github.com/users/brianjjones/events{/privacy}","received_events_url":"https://api.github.com/users/brianjjones/received_events","type":"User","site_admin":false},"created_at":"2017-08-04T23:25:24Z","updated_at":"2017-08-04T23:25:24Z","body":"Unfortunately I still can't seem to get this working.  I altered the NodeWebSocketClient.js to  call ws.terminate() after about 10 seconds, and then create a new WebSocket connection after another 5.  It always hangs at the same spot during the second connect, zjs_web_sockets.c:220.  I suspect it may be a Zephyr bug.  Whoever looks at this next might see if there are any zephyr samples that could demonstrate being able to reconnect or have multiple clients."}}
{"actor":{"display_login":"brianjjones"}}