Fix of crash when network is unreachable during connecting
This commit is contained in:
parent
4b99d73adf
commit
7719285010
@ -153,16 +153,16 @@ BOOL wasOpenned = FALSE;
|
|||||||
{
|
{
|
||||||
NSLog(@"Stream event error: %@", [[stream streamError] localizedDescription]);
|
NSLog(@"Stream event error: %@", [[stream streamError] localizedDescription]);
|
||||||
|
|
||||||
|
[self close];
|
||||||
|
|
||||||
if (wasOpenned) {
|
if (wasOpenned) {
|
||||||
self.errorEventHandler([[stream streamError] localizedDescription]);
|
self.errorEventHandler([[stream streamError] localizedDescription]);
|
||||||
self.closeEventHandler(TRUE);
|
self.closeEventHandler(TRUE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
self.openErrorEventHandler([[stream streamError] localizedDescription]);
|
|
||||||
self.errorEventHandler([[stream streamError] localizedDescription]);
|
self.errorEventHandler([[stream streamError] localizedDescription]);
|
||||||
|
self.openErrorEventHandler([[stream streamError] localizedDescription]);
|
||||||
}
|
}
|
||||||
|
|
||||||
[self close];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
Loading…
Reference in New Issue
Block a user