diff options
| author | Alexandros Naskos <alex_naskos@hotmail.com> | 2020-12-17 11:08:21 +0200 |
|---|---|---|
| committer | Alexandros Naskos <alex_naskos@hotmail.com> | 2020-12-17 11:08:21 +0200 |
| commit | 85cc3f24a0c1ee9957d0264bd7532441090cbd6c (patch) | |
| tree | 28b104f0cbecf640980451d95642466f1c4797cf /lib/std/os | |
| parent | aa6654a4b3c64499ccb4b16e1f7257e7da14ef81 (diff) | |
| download | zig-85cc3f24a0c1ee9957d0264bd7532441090cbd6c.tar.gz zig-85cc3f24a0c1ee9957d0264bd7532441090cbd6c.zip | |
Only check for evented mode in windows.OpenFile when in async mode
Diffstat (limited to 'lib/std/os')
| -rw-r--r-- | lib/std/os/windows.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 77300037bd..c9e19452d0 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -110,7 +110,7 @@ pub fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HAN ); switch (rc) { .SUCCESS => { - if (options.io_mode == .evented) { + if (std.io.is_async and options.io_mode == .evented) { _ = CreateIoCompletionPort(result, std.event.Loop.instance.?.os_data.io_port, undefined, undefined) catch undefined; } return result; |
