in AppSyncRealTimeClient/Connection/AppSyncConnection/AppSyncSubscriptionConnection+Connection.swift [11:24]
func handleConnectionEvent(connectionState: ConnectionState) {
// If we get back not connected during an inprogress subscription connection
// we should retry the connection
if connectionState == .notConnected
&& subscriptionState == .inProgress {
let connectionError = ConnectionProviderError.connection
handleError(error: connectionError)
return
}
if connectionState == .connected {
AppSyncLogger.debug("[AppSyncSubscriptionConnection] \(#function): connection is connected, start subscription.")
startSubscription()
}
}