Skip to content

Commit f722776

Browse files
authored
Merge pull request #2386 from gmittert/AlwaysHandleBrokenPipes
Always Handle Broken Pipes on Windows
2 parents c0b7c63 + 64aa5e3 commit f722776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/FileHandle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ open class FileHandle : NSObject {
267267
var BytesRead: DWORD = 0
268268
if !ReadFile(_handle, buffer.advanced(by: total), BytesToRead, &BytesRead, nil) {
269269
let err = GetLastError()
270-
if err == ERROR_BROKEN_PIPE && untilEOF {
270+
if err == ERROR_BROKEN_PIPE {
271271
break
272272
}
273273
free(buffer)

0 commit comments

Comments
 (0)