New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: migrate to server side connect #1908
Conversation
4789b52
to
240389c
Compare
240389c
to
1b1445b
Compare
5b08ef0
to
460b013
Compare
24a54a8
to
11d3b8c
Compare
c9a0533
to
dab8db0
Compare
} | ||
browser = playwright.PreLaunchedBrowser; | ||
browser.ShouldCloseConnectionOnClose = true; | ||
browser.Disconnected += (_, _) => ClosePipe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would hope that the line above takes care of this.
} | ||
var task = CreateBrowserTask(); | ||
var timeout = options?.Timeout != null ? (int)options.Timeout : 30_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't technically need it, can be improved in a separate PR.
@@ -603,6 +598,10 @@ private Task WaitForURLAsync(string urlString, Regex urlRegex, Func<string, bool | |||
private Waiter SetupNavigationWaiter(string @event, float? timeout) | |||
{ | |||
var waiter = new Waiter((this.Page as Page)!.Channel, @event); | |||
if (this.Page.IsClosed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should refactor it (and in upstream) to only rely on the connection. I.e. don't hide the waitForEventInfo rejection.
dab8db0
to
ff0faa4
Compare
Fixes #986