dprint / dprint-intellij

A dprint plugin for Intellij.
https://plugins.jetbrains.com/plugin/18192-dprint
MIT License
12 stars 2 forks source link

Better error handling when services disposed. #75

Closed ryan-rushton closed 6 months ago

ryan-rushton commented 6 months ago

Overview

Since raising the exception logging to be a little more aggressive there are race conditions that trigger errors when the plugin is being disposed. Namely, the stdout listener in the v5 editor service raises an error sometimes due to the stream being shut down which it is listening to.

This PR simply turns logging off while disposing of the plugin. I also pushed the threads into the listeners as it makes more sense to have the listeners control their own threading.