mak server read files synchronous
This commit is contained in:
		
							
								
								
									
										2
									
								
								MareAPI
									
									
									
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								MareAPI
									
									
									
									
									
								
							 Submodule MareAPI updated: af8516d44a...ffc0a48fda
									
								
							| @@ -68,9 +68,8 @@ namespace MareSynchronosServer.Hubs | ||||
|  | ||||
|             var path = Path.Combine(BasePath, hash); | ||||
|             await using var fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read); | ||||
|             while ((readByteCount = await fs.ReadAsync(buffer, 0, chunkSize, ct)) > 0) | ||||
|             while ((readByteCount = fs.Read(buffer, 0, chunkSize)) > 0) | ||||
|             { | ||||
|                 await Task.Delay(10, ct); | ||||
|                 yield return readByteCount == chunkSize ? buffer.ToArray() : buffer.Take(readByteCount).ToArray(); | ||||
|             } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stanley Dimant
					Stanley Dimant