-
Notifications
You must be signed in to change notification settings - Fork 749
Description
Summary
In a legacy project I'm stuck with version 0.53.0 of Apollo-iOS.
I noticed once thing, the subscription is not restored when it's disconnected initially. I even tried manually disconnecting and reconnecting but in vain.
Here's
nw_connection_get_connected_socket_block_invoke [C24] Client called
nw_connection_get_connected_socket on unconnected nw_connection
TCP Conn 0x60000332e080 Failed : error 0:50 [50]
"websocket is disconnected: Error Domain=NSPOSIXErrorDomain Code=50 \"Network is down\" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}"
Version
0.53.0
Steps to reproduce the behavior
I disconnected the device from internet, landed on a screen where a subscription is fired. The subscription failed with these errors.
nw_connection_get_connected_socket_block_invoke [C24] Client called
nw_connection_get_connected_socket on unconnected nw_connection
TCP Conn 0x60000332e080 Failed : error 0:50 [50]
"websocket is disconnected: Error Domain=NSPOSIXErrorDomain Code=50 \"Network is down\" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}"
I reconnected the internet, made another mutation from same screen, and it's successful, however, the subscription errors are still being logged at the reconnection interval rate.
I noticed two things while debugging..
-
Even if I set reconnect = false and try to manually deallocate the subscription by setting to nil or call
.canceland reassign it again, the same errors are getting logged. -
I was debugging the library source code, and added few breakpoints here and there, and surprisingly sometimes the subscription was restored. This happened few times but I couldn't infer the exact steps to reproduced.