Kaynağa Gözat

Simplify +[FLEXNetworkObserver nextRequestID]

Ryan Olson 11 yıl önce
ebeveyn
işleme
b66857f0da

+ 1 - 10
Classes/Network/PonyDebugger/FLEXNetworkObserver.m

@@ -133,16 +133,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
 
 
 + (NSString *)nextRequestID
 + (NSString *)nextRequestID
 {
 {
-    static NSInteger sequenceNumber = 0;
-    static NSString *seed = nil;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        CFUUIDRef uuid = CFUUIDCreate(CFAllocatorGetDefault());
-        seed = (__bridge NSString *)CFUUIDCreateString(CFAllocatorGetDefault(), uuid);
-        CFRelease(uuid);
-    });
-    
-    return [[NSString alloc] initWithFormat:@"%@-%ld", seed, (long)(++sequenceNumber)];
+    return [[NSUUID UUID] UUIDString];
 }
 }
 
 
 #pragma mark Delegate Injection Convenience Methods
 #pragma mark Delegate Injection Convenience Methods