commit 9ea4ddae97925ff3a988da8c010e98a3495c1869 (tree)
parent a2582df5b2cbf96823a239624857461fe65433f3
Author: heidezomp <heidezomp@protonmail.com>
Date: Mon, 26 Oct 2020 23:59:16 +0100
linuxWaitFd: make NetworkSubsystemFailed error unreachable
This error from os.poll is Windows-specific, so unreachable on Linux.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig
@@ -466,8 +466,9 @@ pub const Loop = struct {
.revents = undefined,
}};
_ = os.poll(&pfd, -1) catch |poll_err| switch (poll_err) {
+ error.NetworkSubsystemFailed => unreachable, // only possible on windows
+
error.SystemResources,
- error.NetworkSubsystemFailed,
error.Unexpected,
=> {
// Even poll() didn't work. The best we can do now is sleep for a