Skip to content
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

Provide an API to stop the Watchdog #738

Closed
damien-urruty-sonarsource opened this issue Jul 8, 2020 · 2 comments
Closed

Provide an API to stop the Watchdog #738

damien-urruty-sonarsource opened this issue Jul 8, 2020 · 2 comments

Comments

@damien-urruty-sonarsource

Hello,

I am in a situation where I need to shutdown the watchdog manually.

We are developing an IntelliJ plugins that uses OkHttp (and Okio) (https://sonarlint.org/). Since latest versions of IntelliJ, plugins can be installed and uninstalled without restarting the IDE. It means that when plugin is uninstalled we need to unload all the classes we use, and Okio is part of that. I use the latest version of OkHttp (4.7.2)

I opened a ticket for a similar issue in OkHttp: square/okhttp#6173. I am able to find a workaround for it, but here I can't do anything for Okio, so we are a bit blocked.

I was able to prove that the Watchdog was preventing unloading by commenting out the call to start on it, and rebuilding Okio + OkHttp in my project.

I know that this has been discussed several times, and in the end you introduced this: #256. Unfortunately this is not sufficient in our case. We are allowed a rather short window (5s) to unload everything, so we can't wait 1min here... That's why we would need an API to stop it (or maybe to not activate it in a first place)

I totally understand why you are reluctant to introduce such an API, but I think this is a valid use case.

@damien-urruty-sonarsource
Copy link
Author

Hello here!

I forgot to mention that I would be glad to contribute by providing a fix for this issue. If you consider this issue needs to be tackled, could you please suggest a way to fix, e.g. an API to stop this watchdog ?
Thanks

@swankjesse
Copy link
Collaborator

It times out automatically after 60s. No further action on this, other than potentially changing the timeout to be something shorter.

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

No branches or pull requests

3 participants