{"action":"opened","issue":{"url":"https://api.github.com/repos/square/SocketRocket/issues/314","labels_url":"https://api.github.com/repos/square/SocketRocket/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/square/SocketRocket/issues/314/comments","events_url":"https://api.github.com/repos/square/SocketRocket/issues/314/events","html_url":"https://github.com/square/SocketRocket/issues/314","id":119396737,"number":314,"title":"EXC_BAD_ACCESS in closeWithCode","user":{"login":"NVentimiglia","id":125889,"avatar_url":"https://avatars.githubusercontent.com/u/125889?v=3","gravatar_id":"","url":"https://api.github.com/users/NVentimiglia","html_url":"https://github.com/NVentimiglia","followers_url":"https://api.github.com/users/NVentimiglia/followers","following_url":"https://api.github.com/users/NVentimiglia/following{/other_user}","gists_url":"https://api.github.com/users/NVentimiglia/gists{/gist_id}","starred_url":"https://api.github.com/users/NVentimiglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVentimiglia/subscriptions","organizations_url":"https://api.github.com/users/NVentimiglia/orgs","repos_url":"https://api.github.com/users/NVentimiglia/repos","events_url":"https://api.github.com/users/NVentimiglia/events{/privacy}","received_events_url":"https://api.github.com/users/NVentimiglia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-29T23:45:17Z","updated_at":"2015-11-29T23:45:17Z","closed_at":null,"body":"I am attempting to connect to a web socket using this library from within a Unity3d application. Shortly after calling Open I get a crash with a EXC_BAD_ACCESS (code=1, address=0x30) on thread 1. I am not sure how to debug this. Here is the code that Xcode shows me.\r\n\r\n`````\r\n- (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;\r\n{\r\n    assert(code);\r\n    dispatch_async(_workQueue, ^{\r\n        if (self.readyState == SR_CLOSING || self.readyState == SR_CLOSED) {\r\n            return;\r\n        }\r\n        \r\n        BOOL wasConnecting = self.readyState == SR_CONNECTING;`````\r\n\r\nI am crashing on the dispatch_async line.\r\n\r\nmy code is below\r\n\r\n`````\r\n    SRWebSocket *ws =[[SRWebSocket alloc] initWithURLRequest:[NSURLRequest requestWithURL:url]];\r\n    ws.delegate = self;\r\n        \r\n    [ws open];\r\n`````\r\n\r\nAm I doing it wrong ?"}}