{"action":"opened","issue":{"url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/380","labels_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/380/comments","events_url":"https://api.github.com/repos/robbiehanson/CocoaAsyncSocket/issues/380/events","html_url":"https://github.com/robbiehanson/CocoaAsyncSocket/issues/380","id":118831721,"number":380,"title":"I can only connect host once","user":{"login":"PeterHan1981","id":3624714,"avatar_url":"https://avatars.githubusercontent.com/u/3624714?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterHan1981","html_url":"https://github.com/PeterHan1981","followers_url":"https://api.github.com/users/PeterHan1981/followers","following_url":"https://api.github.com/users/PeterHan1981/following{/other_user}","gists_url":"https://api.github.com/users/PeterHan1981/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterHan1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterHan1981/subscriptions","organizations_url":"https://api.github.com/users/PeterHan1981/orgs","repos_url":"https://api.github.com/users/PeterHan1981/repos","events_url":"https://api.github.com/users/PeterHan1981/events{/privacy}","received_events_url":"https://api.github.com/users/PeterHan1981/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-25T12:59:44Z","updated_at":"2015-11-25T12:59:44Z","closed_at":null,"body":"Dear friends:\r\n    As  title, When I connect the host once , it works perfect.  it can read , write,and so . But when I disconnect it , and reconnect it the second time, it disconnect automatic. my disconnect code is:\r\n(void)myDisconnect\r\n {\r\n     [self.mSocket setDelegate:nil delegateQueue:NULL]; \r\n     [self.mSocket disconnect]; \r\n     self.mSocket = nil;\r\n } \r\nWhen the second time I connect the same host, The GCDAsyncSocket's function named setupReadAndWriteSourcesForNewlyConnectedSocket in to socketFDBytesAvailable=0, so it calls [strongSelf doReadEOF]; and then automatic disconnect. So I can't connect the host.What happens?"}}