File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ - (instancetype)init {
2626 if (self) {
2727 _reportEnable = YES ;
2828 _interval = 10 ;
29- _serverURL = @" https://uplog.qbox.me/log/4" ;
29+ _serverURL = @" https://uplog.qbox.me/log/4?compressed=gzip " ;
3030 _recordDirectory = [NSString stringWithFormat: @" %@ /report" , [QNUtils sdkCacheDirectory ]];
3131 _maxRecordFileSize = 2 * 1024 * 1024 ;
3232 _uploadThreshold = 4 * 1024 ;
Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ - (void)innerReport:(NSString *)jsonString token:(NSString *)token {
126126 }
127127 }
128128
129- // 判断是否满足上传条件:文件大于上报临界值 && (首次上传 || 距上次上传时间大于_config.interval)
129+ // 判断是否满足上传条件:文件大于上报临界值 || (首次上传 || 距上次上传时间大于_config.interval)
130130 NSTimeInterval currentTime = [[NSDate dateWithTimeIntervalSinceNow: 0 ] timeIntervalSince1970 ];
131- if (file.size > _config.uploadThreshold && (_lastReportTime == 0 || currentTime - _lastReportTime > _config.interval * 60 )) {
131+ if (file.size > _config.uploadThreshold || (_lastReportTime == 0 || currentTime - _lastReportTime > _config.interval * 60 )) {
132132
133133 NSMutableURLRequest *request = [[NSMutableURLRequest alloc ] initWithURL: [NSURL URLWithString: _config.serverURL]];
134134 [request setValue: [NSString stringWithFormat: @" UpToken %@ " , token] forHTTPHeaderField: @" Authorization" ];
You can’t perform that action at this time.
0 commit comments