aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-plugin-manager.c')
-rw-r--r--src/mm-plugin-manager.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c
index fb21305d..b46b3a6f 100644
--- a/src/mm-plugin-manager.c
+++ b/src/mm-plugin-manager.c
@@ -1258,6 +1258,16 @@ device_context_cancel (DeviceContext *device_context)
g_list_foreach (device_context->port_contexts, (GFunc) port_context_cancel, NULL);
}
+ /* Cancel all timeouts */
+ if (device_context->min_wait_time_id) {
+ g_source_remove (device_context->min_wait_time_id);
+ device_context->min_wait_time_id = 0;
+ }
+ if (device_context->min_probing_time_id) {
+ g_source_remove (device_context->min_probing_time_id);
+ device_context->min_probing_time_id = 0;
+ }
+
/* Wakeup the device context logic. If we were still waiting for the
* min probing time, this will complete the device context. */
device_context_continue (device_context);