diff --git a/Lib/Azure Storage Client Library/Azure Storage Client Library/AZSBlobUploadHelper.m b/Lib/Azure Storage Client Library/Azure Storage Client Library/AZSBlobUploadHelper.m index 4441e97..a4d21d1 100644 --- a/Lib/Azure Storage Client Library/Azure Storage Client Library/AZSBlobUploadHelper.m +++ b/Lib/Azure Storage Client Library/Azure Storage Client Library/AZSBlobUploadHelper.m @@ -442,6 +442,19 @@ -(void)writeFromStreamCallbackWithStream:(NSInputStream *)inputStream; } self.streamWaiting = NO; } + else if (self.streamingError) { + NSError *error = self.streamingError; + [self.operationContext logAtLevel:AZSLogLevelError withMessage:@"Error in stream callback. Error code = %ld, error domain = %@, error userinfo = %@", (long)error.code, error.domain, error.userInfo]; + // Note that the below method is syncronous for the time being. + [self closeWithCompletionHandler:^{ + ; + }]; + + if (self.completionHandler) + { + self.completionHandler(error); + } + } } } @@ -554,4 +567,4 @@ -(void)openWithCompletionHandler:(void (^)(BOOL))completionHandler } } -@end \ No newline at end of file +@end