mafredri / cdp

Package cdp provides type-safe bindings for the Chrome DevTools Protocol (CDP), written in the Go programming language.
MIT License
725 stars 45 forks source link

session.Manager does not properly close if connection was closed with non-nil error #111

Closed dgstevens closed 4 years ago

dgstevens commented 4 years ago

74 propagates the error which closes a connection. This causes the check in session.Manager. watch's isClosing function to fail because the cause is the original error instead of rpcc.ErrConnClosing. This prevents the Manager's goroutine from properly terminating, and it ends up spinning and continuously polling.

mafredri commented 4 years ago

Ah, unfortunate byproduct :(. Thanks for reporting, I'll see what can be done about it.

mafredri commented 4 years ago

@dgstevens does #112 fix your issue?

dgstevens commented 4 years ago

Yeah, it looks like that change should fix it.