linuxWaitFd: make NetworkSubsystemFailed error unreachable

This error from os.poll is Windows-specific, so unreachable on Linux.
This commit is contained in:
heidezomp
2020-10-26 23:59:16 +01:00
committed by Andrew Kelley
parent a2582df5b2
commit 9ea4ddae97

View File

@@ -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