Workaround for Swift2 which apparently fails to retain the completion blocks passed as parameters

This commit is contained in:
tifroz
2015-09-21 14:40:24 -07:00
parent 44c6a8adcf
commit 9d38bb4f94
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -242,7 +242,7 @@
- (void)performReadDataWithCompletion:(GCDWebServerBodyReaderCompletionBlock)block {
if ([_reader respondsToSelector:@selector(asyncReadDataWithCompletion:)]) {
[_reader asyncReadDataWithCompletion:block];
[_reader asyncReadDataWithCompletion:[block copy]];
} else {
NSError* error = nil;
NSData* data = [_reader readData:&error];