Skip to content

Fix websocket logger response race#603

Open
kanutocd wants to merge 1 commit into
rubycdp:mainfrom
kanutocd:fix/logger-response-race
Open

Fix websocket logger response race#603
kanutocd wants to merge 1 commit into
rubycdp:mainfrom
kanutocd:fix/logger-response-race

Conversation

@kanutocd

@kanutocd kanutocd commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • Log websocket responses before delivering them to waiting commands
  • Prevent callers from reading logger output before the command response has been written

Verification

  • bundle exec rspec spec/unit/browser_spec.rb
  • bundle exec rspec spec/browser_spec.rb:44
  • bundle exec rubocop lib/ferrum/client/web_socket.rb spec/unit/browser_spec.rb
  • bundle exec rake test

- Log websocket responses before pushing them to the waiting command queue so callers cannot observe a completed command before its response has been written to the configured logger.
@kanutocd kanutocd marked this pull request as draft July 13, 2026 23:59
@kanutocd kanutocd marked this pull request as ready for review July 14, 2026 00:02
@kanutocd kanutocd marked this pull request as draft July 14, 2026 00:16
@kanutocd kanutocd marked this pull request as ready for review July 14, 2026 01:04
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.

1 participant