简体   繁体   English

连接DidFinishLoading后SocketRocket崩溃

[英]SocketRocket crashes after connectionDidFinishLoading

So i want to develop a basic chat application using socket.io. 所以我想使用socket.io开发一个基本的聊天应用程序。 I'm using this framework which is essentially just a wrapper over SocketRocket. 我正在使用这个框架,它实际上只是SocketRocket的包装。

Now i made a connectToHost:onPort and i receive a 200 in didReceiveResponse. 现在我做了一个connectToHost:onPort,我在didReceiveResponse中收到了200。 The connectionDidFinishLoading also is called. connectionDidFinishLoading也被调用。 It finally prints Opening URL_NAME in the openSocket method before i get a EXC_BAD_ACCESS at this method: 最后,在我通过此方法获得EXC_BAD_ACCESS之前,它会在openSocket方法中打印Opening URL_NAME:

[self _performDelegateBlock:^{
    if ([self.delegate respondsToSelector:@selector(webSocketDidOpen:)]) {  // <- EXC_BAD_ACESSS error here
        [self.delegate webSocketDidOpen:self];
    };
}];

Any idea what it could be? 知道会是什么吗? From my understanding, the framework i'm using should implement this delegate method of Socket Rocket. 据我了解,我使用的框架应该实现Socket Rocket的委托方法。

Thanks in advance! 提前致谢!

Finally found the error and it was rather silly. 终于发现了错误,这很愚蠢。 I should have created a class variable of the SocketIO instance. 我应该已经创建了SocketIO实例的类变量。 Thats why the life cycle was over and the delagate was nil. 这就是为什么生命周期结束且滞后物为零的原因。 Ah well! 呃,好吧!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 上传所有数据之后和connectionDidFinishLoading之前,NSURLConnection崩溃 - NSURLConnection crashes after all the data is uploaded and before connectionDidFinishLoading SocketRocket崩溃了Node.js WebSocket - SocketRocket crashes Node.js WebSocket 在connectionDidFinishLoading之后收到NSURLConnection数据 - NSURLConnection data received after connectionDidFinishLoading connectionDidFinishLoading后返回collectionView函数 - Return to collectionView function after connectionDidFinishLoading 调用connectionDidFinishLoading后更新View Controller - Update View Controller After connectionDidFinishLoading is Called connectionDidFinishLoading完成后无法重新加载UITableView - Unable to reload UITableView after connectionDidFinishLoading completes 连接DidFinishLoading后,其他功能无法运行? - After connectionDidFinishLoading other function don't run? 在connectionDidFinishLoading请求后选择其他xib - Choose different xib after connectionDidFinishLoading request SocketRocket尝试安装socketrocket后我可以让PonyDebugger工作,我得到3个Apple Match-O链接器错误 - SocketRocket After trying to install socketrocket so that I can make PonyDebugger work, I'm getting 3 Apple Match-O linker errors 15次快速调用后,NSURLConnection委托仅获得一次connectionDidFinishLoading - NSURLConnection delegate gets connectionDidFinishLoading only once after 15 rapid calls
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM