Skip to content

Reduce Chromium restart wait time#314

Closed
chruffins wants to merge 1 commit into
mainfrom
hypeship/copy-1525-changes
Closed

Reduce Chromium restart wait time#314
chruffins wants to merge 1 commit into
mainfrom
hypeship/copy-1525-changes

Conversation

@chruffins

@chruffins chruffins commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

(See KERNEL-1525)

Root cause: waitForPort in chromium-launcher probed port 9223 with SO_REUSEADDR disabled. After CDP health checks, TIME_WAIT sockets are always present on that port. The probe failed for the full 5s timeout, then Chromium bound immediately anyway (since it uses SO_REUSEADDR).

Fix: Use Go's default net.Listen, which sets SO_REUSEADDR and matches Chromium's apparent DevTools bind behavior. The probe still waits if an active LISTEN from the old process is lingering after SIGKILL, but no longer blocks on harmless TIME_WAIT sockets from prior CDP connections.

- Simplify waitForPort in chromium-launcher: remove SO_REUSEADDR
  disable, use plain net.Listen for accurate port checks
- Refactor playwright-daemon timeout: replace AbortSignal.timeout
  with Promise.race + setTimeout, remove withTimeout helper
- Delete unused wsdrain package and its registry from all call sites
- Remove wsdrain dependency from wsproxy, chromedriverproxy,
  devtoolsproxy, and api server
- Update capmonster defaultSettings to include HCaptcha
@chruffins chruffins closed this Jul 13, 2026
@chruffins chruffins changed the title Port changes from kernel-images-private 1525 branch Reduce Chromium restart wait time Jul 13, 2026
@chruffins chruffins deleted the hypeship/copy-1525-changes branch July 13, 2026 17:50
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