From 7a61fa24f2c2a27302975ef1a440bd0e33319882 Mon Sep 17 00:00:00 2001 From: "Billy.Zheng" Date: Thu, 22 Jun 2023 18:48:23 +0800 Subject: [PATCH] Fix bug. --- src/procodile/supervisor.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/procodile/supervisor.cr b/src/procodile/supervisor.cr index 1fefa23..269289b 100644 --- a/src/procodile/supervisor.cr +++ b/src/procodile/supervisor.cr @@ -266,13 +266,13 @@ module Procodile loop do @signal_handler.handle - if reader.read_byte + if reader.read_byte.nil? reader.close buffer.delete(reader) @readers.delete(reader) else buffer[reader] ||= "" - buffer[reader] += reader.read_string(4096) + buffer[reader] += reader.gets_to_end while buffer[reader].index("\n") line, buffer[reader] = buffer[reader].split("\n", 2)