mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 23:19:50 +00:00
unifying: Do not poll when we're waiting for device replug
If we happen to poll when the device is in the *process* of closing then the open() fails in a weird way. If we're flashing it's probably a good idea to not be too clever anyway...
This commit is contained in:
parent
7048044156
commit
3045d1ca3f
@ -403,6 +403,13 @@ static gboolean
|
||||
lu_context_poll_cb (gpointer user_data)
|
||||
{
|
||||
LuContext *ctx = LU_CONTEXT (user_data);
|
||||
|
||||
/* do not poll when we're waiting for device replug */
|
||||
if (g_hash_table_size (ctx->hash_replug) > 0) {
|
||||
g_warning ("NOT POLLING");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
for (guint i = 0; i < ctx->devices->len; i++) {
|
||||
LuDevice *device = g_ptr_array_index (ctx->devices, i);
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user