Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/debug/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def process
}
end

return unless line
Copy link
Member

@st0012 st0012 Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the nil is expected after the Socket is closed, I think it'd be clearer if we dear with it around line 162. For example:

         if line = @sock.gets
           DEBUGGER__.info "UI_Server received: #{line.chomp}"
           line
         else
           # socket is closed
           return
         end

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the lines are already complicated so I left it.

next if line == :can_not_read

case line
Expand All @@ -187,7 +188,7 @@ def process
raise "pid:#{Process.pid} but get #{line}"
end
else
STDERR.puts "unsupported: #{line}"
STDERR.puts "unsupported: #{line.inspect}"
exit!
end
end
Expand Down