{"action":"created","issue":{"url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/382","repository_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket","labels_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/382/labels{/name}","comments_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/382/comments","events_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/382/events","html_url":"https://github.com/robbiehanson/CocoaAsyncSocket/issues/382","id":119046011,"number":382,"title":"getaddrinfo() behavior under iOS9","user":{"login":"esad","id":11807,"avatar_url":"https://avatars.githubusercontent.com/u/11807?v=3","gravatar_id":"","url":"https://api.github.com/users/esad","html_url":"https://github.com/esad","followers_url":"https://api.github.com/users/esad/followers","following_url":"https://api.github.com/users/esad/following{/other_user}","gists_url":"https://api.github.com/users/esad/gists{/gist_id}","starred_url":"https://api.github.com/users/esad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esad/subscriptions","organizations_url":"https://api.github.com/users/esad/orgs","repos_url":"https://api.github.com/users/esad/repos","events_url":"https://api.github.com/users/esad/events{/privacy}","received_events_url":"https://api.github.com/users/esad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-26T13:37:09Z","updated_at":"2016-04-29T05:56:42Z","closed_at":null,"body":"It seems that `getaddrinfo()` behavior has changed in iOS9 in the way that the first call for an address fails immediately if it's not in the cache. This results in first connection attempt failing with an `kCFStreamErrorDomainNetDB` (code 8) error.\r\n"},"comment":{"url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/comments/215632712","html_url":"https://github.com/robbiehanson/CocoaAsyncSocket/issues/382#issuecomment-215632712","issue_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/382","id":215632712,"user":{"login":"deckikwok","id":1747820,"avatar_url":"https://avatars.githubusercontent.com/u/1747820?v=3","gravatar_id":"","url":"https://api.github.com/users/deckikwok","html_url":"https://github.com/deckikwok","followers_url":"https://api.github.com/users/deckikwok/followers","following_url":"https://api.github.com/users/deckikwok/following{/other_user}","gists_url":"https://api.github.com/users/deckikwok/gists{/gist_id}","starred_url":"https://api.github.com/users/deckikwok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deckikwok/subscriptions","organizations_url":"https://api.github.com/users/deckikwok/orgs","repos_url":"https://api.github.com/users/deckikwok/repos","events_url":"https://api.github.com/users/deckikwok/events{/privacy}","received_events_url":"https://api.github.com/users/deckikwok/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T05:56:42Z","updated_at":"2016-04-29T05:56:42Z","body":" This isn't fix?\r\n\r\n1. I have the same issue when I am establishing connection over p2p wifi and bt. wifi infra is working fine.\r\n\r\n2. To validate that the second call works, I had to store the NSNetService I intend to connect to and reconnect on disconnection. On the second attempt, it does work.\r\n\r\n3. On the first attempt, the didDisconnect delegate call returns a (null) socket. Not sure why this is the case.\r\n\r\nCan someone advise on how I should proceed?\r\n\r\n"}}