Skip to content

Commit

Permalink
Fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Jun 22, 2023
1 parent 0bf295b commit 7a61fa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/procodile/supervisor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7a61fa2

Please sign in to comment.