virtual_image: Open a window for race conditions during open/close
Delay the open/close callbacks by 100ms so that we have a window of opportunity for race conditions. This is needed to test certain conditiosn in fprintd.
This commit is contained in:
parent
fab349f356
commit
a63dcc96d5
1 changed files with 4 additions and 2 deletions
|
@ -288,7 +288,8 @@ dev_init (FpImageDevice *dev)
|
||||||
|
|
||||||
start_listen (self);
|
start_listen (self);
|
||||||
|
|
||||||
fpi_image_device_open_complete (dev, NULL);
|
/* Delay result to open up the possibility of testing race conditions. */
|
||||||
|
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_open_complete, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -303,7 +304,8 @@ dev_deinit (FpImageDevice *dev)
|
||||||
g_clear_object (&self->listener);
|
g_clear_object (&self->listener);
|
||||||
g_clear_object (&self->connection);
|
g_clear_object (&self->connection);
|
||||||
|
|
||||||
fpi_image_device_close_complete (dev, NULL);
|
/* Delay result to open up the possibility of testing race conditions. */
|
||||||
|
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_close_complete, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue