Skip to content

Conversation

ko1
Copy link
Collaborator

@ko1 ko1 commented Jun 27, 2022

@sock.gets can return nil if @sock is closed.
Return this method and cleanup the server connection.

fix #622

`@sock.gets` can return `nil` if `@sock` is closed.
Return this method and cleanup the server connection.

fix #622
}
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.

@ko1 ko1 merged commit 78a27f6 into master Jun 28, 2022
@ko1 ko1 deleted the fix622 branch June 28, 2022 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote Debuggee crashes on Debugger's "quit" command
2 participants