Commit 9ea4ddae97

heidezomp <heidezomp@protonmail.com>
2020-10-26 23:59:16
linuxWaitFd: make NetworkSubsystemFailed error unreachable
This error from os.poll is Windows-specific, so unreachable on Linux.
1 parent a2582df
Changed files (1)
lib
std
event
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