Closed jincc closed 6 years ago
Hi @jincc !
Do you have any example app? That could help a ton to pinpoint this issue. Thanks!
I am re-opening and closing the socket when switching between the front and the back. Is this related?
- (void)didEnterBackground:(NSNotification *)_{
if (self.status >= MTBLBCenterStatusConnecting) {
[self close];
}
}
- (void)didBecomeActive:(NSNotification *)_{
if (self.status <= MTBLBCenterStatusDisconnected) {
[self connect];
}
}
@fassko
Try to connect again only if you disconnect from the socket. I think there can be a race condition.
When I was using socket.io.swift, a crash occurred, and the final stack was located in starscream. I suspect it might be a concurrency issue, and I can give good suggestions when I am in trouble.