devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Abort current connection and try with new input

Open beruic opened this issue 2 years ago • 0 comments

What problem does this feature solve?

Currently when connecting (at least when using dependency package) you cannot abort a connection attempt and try again.

I am working on an app where we want to dynamically connect to devtools, by inputting the host and port in a dialog. However when you have done this once, and you perhaps made a mistake, you have to restart the app to try again, because the second time you call devtools.connect() nothing happens. The console keeps periodically outputting errors with the host and port you used the first time, regardless of additional calls to devtools.connect() with new arguments.

What does the proposed API look like?

Add an .abort() function to cancel any active connection, or stop ongoing connection attempts. Run .abort() every time .connect() is called for convenience.

beruic avatar May 25 '22 23:05 beruic