mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-04 07:42:31 -08:00
Special-case BROKEN_PIPE and NO_DATA errors when calling WriteFile
This commit is contained in:
1 file changed
+5
-1
+5
-1
@@ -197,7 +197,11 @@ public class WindowsNamedPipe implements AutoCloseable {
|
||||
.WriteFile(handle, buffer, len, null, overlappedWrite);
|
||||
int err = k32.GetLastError();
|
||||
if (!immediate && err != WinError.ERROR_IO_PENDING) {
|
||||
setError("WriteFile failed: " + err);
|
||||
if (err == WinError.ERROR_BROKEN_PIPE || err == WinError.ERROR_NO_DATA) {
|
||||
setError("Pipe closed");
|
||||
} else {
|
||||
setError("WriteFile failed: " + err);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user