Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Crash on reconnect #9

@psi-gh

Description

@psi-gh

I have such crash. It occurring in ~1 minute after running app if I specify reconnect: true in gql.initServer(connectionParams: nil, reconnect: true)
If I set reconnect to false, there won't be crash, but subscription will stop in 1 minute without any notice.

*** Assertion failure in -[SRWebSocket open], /Pods/SocketRocket/SocketRocket/SRWebSocket.m:389
 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot call -(void)open on SRWebSocket more than once'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010444c12b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000100e17f41 objc_exception_throw + 48
	2   CoreFoundation                      0x00000001044512f2 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00000001008b8d69 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
	4   SocketRocket                        0x00000001007ca323 -[SRWebSocket open] + 355
	5   LiveGQL                             0x000000010079d8e0 _T07LiveGQLAAC9webSocketySQySo05SRWebD0CG_Si16didCloseWithCodeSQySSG6reasonSb8wasCleantF + 192
	6   LiveGQL                             0x000000010079d9fd _T07LiveGQLAAC9webSocketySQySo05SRWebD0CG_Si16didCloseWithCodeSQySSG6reasonSb8wasCleantFTo + 253
	7   SocketRocket                        0x00000001007d3fcb __34-[SRWebSocket stream:handleEvent:]_block_invoke_3 + 187
	8   libdispatch.dylib                   0x0000000105c2c2f7 _dispatch_call_block_and_release + 12
	9   libdispatch.dylib                   0x0000000105c2d33d _dispatch_client_callout + 8
	10  libdispatch.dylib                   0x0000000105c385f9 _dispatch_main_queue_callback_4CF + 628
	11  CoreFoundation                      0x000000010440ee39 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	12  CoreFoundation                      0x00000001043d3462 __CFRunLoopRun + 2402
	13  CoreFoundation                      0x00000001043d2889 CFRunLoopRunSpecific + 409
	14  GraphicsServices                    0x0000000109a779c6 GSEventRunModal + 62
	15  UIKit                               0x00000001016b45d6 UIApplicationMain + 159
	16  xxxxxxxx                            0x00000001003842c7 main + 55
	17  libdyld.dylib                       0x0000000105ca9d81 start + 1
	18  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions