我面临的问题是请求超时错误。仅当设备互联网从一个运营商切换到另一个运营商时才会发生。例如在科威特,如果用户从Ooredoo切换到Zain(https://www.kw.zain.com/kw/af/home.do), 或者在印度Airtel到Vodafone - Web服务停止工作。 但在这种情况下服务器是稳定的
以下是日志
从设备获取日志
//Logs Started Jun 28 17:09:45 My-iPhone App[964] : [967] [downlaodUpdates]
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."
UserInfo={NSUnderlyingError=0x12466cc30 {Error
Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out."
UserInfo={NSErrorFailingURLStringKey=http://myserver.com,
NSErrorFailingURLKey=http://google.com, _kCFStreamErrorDomainKey=4,
NSLocalizedDescription=The request timed out.}},
NSErrorFailingURLStringKey=http://myserver.com,
NSErrorFailingURLKey=http://myserver.com, _kCFStreamErrorDomainKey=4,
_kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}
Jun 28 17:09:45 My-iPhone networkd[92] : -[NETAWDManager
reportStats:metricID:] AWDServerConnection newMetricContainerWithIdentifier
failed for metric 2686983, server 0x13e523970, not reporting: {
cellularFallbackReport = { dataUsageSnapshotsAtNetworkEvents = ( { bytesIn =
0; bytesOut = 350; } ); "fallbackTimer_msecs" = 0; fellback = 0;
networkEvents = ( "NETWORK_EVENT_DATA_STALL_AT_APP_LAYER" );
"timeToNetworkEvents_msecs" = ( 4334 ); }; clientIdentifier =
"com.xyz.iosapp"; connectionStatisticsReport = { DNSAnswersCached = 1;
"DNSResolvedTime_msecs" = 2; RTTvariance = 139; "appDataStallTimer_msecs" =
3; appReportingDataStallCount = 1; "bestRTT_msecs" = 399;
betterRouteEventCount = 0; bytesDuplicate = 0; bytesIn = 0; bytesOut = 350;
bytesOutOfOrder = 0; bytesRetransmitted = 0; cellularFallback = 0;
cellularRRCConnected = 0; connected = 1; connectedInterfaceType =
"INTERFACE_TYPE_WIFI"; "connectionEstablishmentTime_msecs" = 1322;
connectionReuseCount = 0; "currentRTT_msecs" = 396; "flowDuration_msecs" =
54428; interfaceType = "INTERFACE_TYPE_WIFI"; kernelReportedStalls = 0;
kernelReportingConnectionStalled = 0; kernelReportingReadStalled = 0;
kernelReportingWriteStalled = 0; packetsDuplicate = 0; packetsIn = 0;
packetsOut = 1; packetsOutOfOrder = 0; packetsRetransmitted = 0;
"smoothedRTT_msecs" = 329; synRetransmissionCount = 1; tcpFastOpen = 0;
"timeToConnectionEstablishment_msecs" = 1325; "timeToConnectionStart_msecs"
= 3; "timeToDNSResolved_msecs" = 2; "timeToDNSStart_msecs" = 0; trafficClass
= 0; }; delegated = 0; reportReason =
"REPORT_REASON_DATA_STALL_AT_APP_LAYER"; }
答案 0 :(得分:0)
在这种情况下;重新启动您的应用程序,我认为它将解决您的问题。