{"action":"created","issue":{"url":"https://api.github.com/repos/spark/firmware/issues/539","labels_url":"https://api.github.com/repos/spark/firmware/issues/539/labels{/name}","comments_url":"https://api.github.com/repos/spark/firmware/issues/539/comments","events_url":"https://api.github.com/repos/spark/firmware/issues/539/events","html_url":"https://github.com/spark/firmware/pull/539","id":101051594,"number":539,"title":"Work around a WICED bug crashing when socket connection fails","user":{"login":"monkbroc","id":1919681,"avatar_url":"https://avatars.githubusercontent.com/u/1919681?v=3","gravatar_id":"","url":"https://api.github.com/users/monkbroc","html_url":"https://github.com/monkbroc","followers_url":"https://api.github.com/users/monkbroc/followers","following_url":"https://api.github.com/users/monkbroc/following{/other_user}","gists_url":"https://api.github.com/users/monkbroc/gists{/gist_id}","starred_url":"https://api.github.com/users/monkbroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkbroc/subscriptions","organizations_url":"https://api.github.com/users/monkbroc/orgs","repos_url":"https://api.github.com/users/monkbroc/repos","events_url":"https://api.github.com/users/monkbroc/events{/privacy}","received_events_url":"https://api.github.com/users/monkbroc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-14T16:48:26Z","updated_at":"2015-08-14T16:57:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spark/firmware/pulls/539","html_url":"https://github.com/spark/firmware/pull/539","diff_url":"https://github.com/spark/firmware/pull/539.diff","patch_url":"https://github.com/spark/firmware/pull/539.patch"},"body":"The reason for the bug is WICED deallocating the connection handler twice.\r\n\r\nIt occurs because in `WICED/network/LwIP/WICED/tcpip.c:920` the `netconn_delete( socket->conn_handler );` is not followed by `socket->conn_handler = NULL;` as it is in other places in the code for example in `WICED/network/LwIP/WICED/tcpip.c:931`. This leads `wiced_tcp_delete_socket` to delete the connection handler again, leading to a crash.\r\n\r\nThis should fix #516 and #490. @andyw-lala can you run your tests against this branch please?\r\n\r\nThis should also be reported to Broadcom so they can fix this upstream.\r\n"},"comment":{"url":"https://api.github.com/repos/spark/firmware/issues/comments/131179530","html_url":"https://github.com/spark/firmware/pull/539#issuecomment-131179530","issue_url":"https://api.github.com/repos/spark/firmware/issues/539","id":131179530,"user":{"login":"andyw-lala","id":3930944,"avatar_url":"https://avatars.githubusercontent.com/u/3930944?v=3","gravatar_id":"","url":"https://api.github.com/users/andyw-lala","html_url":"https://github.com/andyw-lala","followers_url":"https://api.github.com/users/andyw-lala/followers","following_url":"https://api.github.com/users/andyw-lala/following{/other_user}","gists_url":"https://api.github.com/users/andyw-lala/gists{/gist_id}","starred_url":"https://api.github.com/users/andyw-lala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyw-lala/subscriptions","organizations_url":"https://api.github.com/users/andyw-lala/orgs","repos_url":"https://api.github.com/users/andyw-lala/repos","events_url":"https://api.github.com/users/andyw-lala/events{/privacy}","received_events_url":"https://api.github.com/users/andyw-lala/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T16:57:17Z","updated_at":"2015-08-14T16:57:17Z","body":"So this would allow us to continue calling the upper level shutdown/disconnect functions, which should take care of housekeeping better ?"}}