diff --git a/src/plugin.c b/src/plugin.c index c2ef5b9d..18b2be7a 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -108,6 +108,9 @@ int plugin_register(plugin_t *plugin) /* Not called, at the moment plugins cannot be unloaded. */ int plugin_unregister(plugin_t *plugin) { + if (is_io_plugin(plugin)) + uev_io_stop(&plugin->watcher); + #ifndef ENABLE_STATIC TAILQ_REMOVE(&plugins, plugin, link);