{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C/issues/80","repository_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C","labels_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C/issues/80/comments","events_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C/issues/80/events","html_url":"https://github.com/aws/aws-iot-device-sdk-embedded-C/issues/80","id":213660501,"number":80,"title":"client stuck when network changes","user":{"login":"larsonmpdx","id":12436438,"avatar_url":"https://avatars1.githubusercontent.com/u/12436438?v=3","gravatar_id":"","url":"https://api.github.com/users/larsonmpdx","html_url":"https://github.com/larsonmpdx","followers_url":"https://api.github.com/users/larsonmpdx/followers","following_url":"https://api.github.com/users/larsonmpdx/following{/other_user}","gists_url":"https://api.github.com/users/larsonmpdx/gists{/gist_id}","starred_url":"https://api.github.com/users/larsonmpdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsonmpdx/subscriptions","organizations_url":"https://api.github.com/users/larsonmpdx/orgs","repos_url":"https://api.github.com/users/larsonmpdx/repos","events_url":"https://api.github.com/users/larsonmpdx/events{/privacy}","received_events_url":"https://api.github.com/users/larsonmpdx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-03-13T02:48:12Z","updated_at":"2017-03-15T21:22:09Z","closed_at":null,"body":"- I'm running a test client inside a vm (with vmware player)\r\n- I get it connected then change the VM's network adapter and it disconnects the test client\r\n- when I bring the VM's network adapter back, I expect the test client to be able to reconnect.  I'm not using the auto reconnect stuff, just running an event loop and calling aws_iot_mqtt_connect() as needed\r\n- it tries to reconnect with aws_iot_mqtt_connect() and returns \"NETWORK_ALREADY_CONNECTED_ERROR\"\r\n- I run aws_iot_mqtt_disconnect() and it returns \"FAILURE\"\r\n\r\nso my program ends up stuck in a state where it can't connect and can't disconnect.  What should I change to make this work?  I can create a minimal reproducer based on subscribe_publish_sample if needed\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C/issues/comments/286883485","html_url":"https://github.com/aws/aws-iot-device-sdk-embedded-C/issues/80#issuecomment-286883485","issue_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-embedded-C/issues/80","id":286883485,"user":{"login":"larsonmpdx","id":12436438,"avatar_url":"https://avatars1.githubusercontent.com/u/12436438?v=3","gravatar_id":"","url":"https://api.github.com/users/larsonmpdx","html_url":"https://github.com/larsonmpdx","followers_url":"https://api.github.com/users/larsonmpdx/followers","following_url":"https://api.github.com/users/larsonmpdx/following{/other_user}","gists_url":"https://api.github.com/users/larsonmpdx/gists{/gist_id}","starred_url":"https://api.github.com/users/larsonmpdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsonmpdx/subscriptions","organizations_url":"https://api.github.com/users/larsonmpdx/orgs","repos_url":"https://api.github.com/users/larsonmpdx/repos","events_url":"https://api.github.com/users/larsonmpdx/events{/privacy}","received_events_url":"https://api.github.com/users/larsonmpdx/received_events","type":"User","site_admin":false},"created_at":"2017-03-15T21:22:09Z","updated_at":"2017-03-15T21:22:09Z","body":"I'd like to go the other direction, I want to simplify this to just \"are we connected? if no, wait with some backoff and connect.  if yes, send messages in a loop\" but I got stuck on the \"already connected\" error.  Ideally the only APIs I'd ever call would be connect() and is_connected()."}}
{"actor":{"display_login":"larsonmpdx"}}