context: Disconnect removed signal handlers on first callback

This signal should happen just once, but ignore any further signal on
first callback.
This commit is contained in:
Marco Trevisan (Treviño) 2023-06-22 00:39:20 -04:00 committed by Marco Trevisan
parent dc8b05f0a3
commit 3b783b9985

View file

@ -142,6 +142,7 @@ remove_device (FpContext *context, FpDevice *device)
static void
device_remove_on_notify_open_cb (FpContext *context, GParamSpec *pspec, FpDevice *device)
{
g_signal_handlers_disconnect_by_func (device, device_remove_on_notify_open_cb, context);
remove_device (context, device);
}