Skip to content

Commit

Permalink
Prevent IOError occurrences in the logger thread (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored Jan 10, 2025
1 parent 6701658 commit c0ceaa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ GEM
rubocop (~> 1.51)
rubocop-sorbet (0.8.7)
rubocop (>= 1)
ruby-lsp (0.23.0)
ruby-lsp (0.23.3)
language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0)
rbs (>= 3, < 4)
Expand Down
2 changes: 2 additions & 0 deletions lib/ruby_lsp/ruby_lsp_rails/runner_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def initialize(outgoing_queue)
while (content = @stderr.gets("\n"))
log_message(content, type: RubyLsp::Constant::MessageType::LOG)
end
rescue IOError
# The server was shutdown and stderr is already closed
end,
Thread,
)
Expand Down

0 comments on commit c0ceaa7

Please sign in to comment.