Skip to content

When WebSocket closed, this following line throws an exception on iOS. #9

Description

@angeloh

Check the error below.

- (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean {
  NSLog(@"WebSocket closed");
  [_handler onCloseWithComGoodowRealtimeJsonJsonObject:@{@"code":[NSNumber numberWithInteger:code], @"reason":reason, @"wasClean":[NSNumber numberWithBool:wasClean]}];

  _handler = nil;
  _webSocket.delegate = nil; (this line throws exception: error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0xd0a3d58c)
  _webSocket = nil;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions