{"action":"created","issue":{"url":"https://api.github.com/repos/solettaproject/soletta/issues/2268","repository_url":"https://api.github.com/repos/solettaproject/soletta","labels_url":"https://api.github.com/repos/solettaproject/soletta/issues/2268/labels{/name}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/2268/comments","events_url":"https://api.github.com/repos/solettaproject/soletta/issues/2268/events","html_url":"https://github.com/solettaproject/soletta/pull/2268","id":168004270,"number":2268,"title":"mqtt: fix connect to broker failed","user":{"login":"laykuanloon","id":14993266,"avatar_url":"https://avatars.githubusercontent.com/u/14993266?v=3","gravatar_id":"","url":"https://api.github.com/users/laykuanloon","html_url":"https://github.com/laykuanloon","followers_url":"https://api.github.com/users/laykuanloon/followers","following_url":"https://api.github.com/users/laykuanloon/following{/other_user}","gists_url":"https://api.github.com/users/laykuanloon/gists{/gist_id}","starred_url":"https://api.github.com/users/laykuanloon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laykuanloon/subscriptions","organizations_url":"https://api.github.com/users/laykuanloon/orgs","repos_url":"https://api.github.com/users/laykuanloon/repos","events_url":"https://api.github.com/users/laykuanloon/events{/privacy}","received_events_url":"https://api.github.com/users/laykuanloon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-28T03:04:57Z","updated_at":"2016-08-02T18:01:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/2268","html_url":"https://github.com/solettaproject/soletta/pull/2268","diff_url":"https://github.com/solettaproject/soletta/pull/2268.diff","patch_url":"https://github.com/solettaproject/soletta/pull/2268.patch"},"body":"mosquitto_connect_async() will do connect() and write(\"CONNECT\") to broker.\r\nGet the following result:\r\na) connect() return \"Operation now in progress\"\r\nb) write(\"CONNECT\") return \"Resource temporarily unavailable\"\r\n\r\nWhen using asynchronous socket, we need to wait for\r\n\"POLLOUT (Writing now will not block) event\" then only can do write().\r\n\r\nNow sol_mqtt_event_loop() callback can be invoke when the \"POLLOUT event\" happen.\r\nThen the mosquitto_loop_write() in sol_mqtt_event_loop() will continue the\r\nwrite(\"CONNECT\") that is failed in the first attempt.\r\n\r\nSigned-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>"},"comment":{"url":"https://api.github.com/repos/solettaproject/soletta/issues/comments/236988987","html_url":"https://github.com/solettaproject/soletta/pull/2268#issuecomment-236988987","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/2268","id":236988987,"user":{"login":"glima","id":67689,"avatar_url":"https://avatars.githubusercontent.com/u/67689?v=3","gravatar_id":"","url":"https://api.github.com/users/glima","html_url":"https://github.com/glima","followers_url":"https://api.github.com/users/glima/followers","following_url":"https://api.github.com/users/glima/following{/other_user}","gists_url":"https://api.github.com/users/glima/gists{/gist_id}","starred_url":"https://api.github.com/users/glima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glima/subscriptions","organizations_url":"https://api.github.com/users/glima/orgs","repos_url":"https://api.github.com/users/glima/repos","events_url":"https://api.github.com/users/glima/events{/privacy}","received_events_url":"https://api.github.com/users/glima/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T18:01:54Z","updated_at":"2016-08-02T18:01:54Z","body":":+1:  as well"}}
{"actor":{"display_login":"glima"}}