From ce2cdb44e1ec7182c0177737e4cbda956ff31702 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Fri, 25 Nov 2022 00:11:02 -0800 Subject: [PATCH] Use new enum for checking writable --- src/bun.js/api/bun/subprocess.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig index 633e12d19e..43cb5cbd91 100644 --- a/src/bun.js/api/bun/subprocess.zig +++ b/src/bun.js/api/bun/subprocess.zig @@ -365,7 +365,7 @@ pub const Subprocess = struct { // we do this rather than epoll or kqueue() // because we don't want to block the thread waiting for the write switch (bun.isWritable(this.fd)) { - .writable => { + .ready => { if (this.poll_ref) |poll_ref| { poll_ref.flags.insert(.writable); poll_ref.flags.insert(.fifo); @@ -376,7 +376,7 @@ pub const Subprocess = struct { this.deinit(); return; }, - .not_writable => { + .not_ready => { if (!this.isWatching()) this.watch(this.fd); return; }, @@ -511,7 +511,7 @@ pub const Subprocess = struct { } pub fn canRead(this: *BufferedOutput) bool { - return bun.isReadable(this.fifo.fd); + return bun.isReadable(this.fifo.fd) == .ready; } pub fn onRead(this: *BufferedOutput, result: JSC.WebCore.StreamResult) void {