Commit c8a166a5 authored by Yuri Benditovich's avatar Yuri Benditovich Committed by Victor Toso

usb-redir: use g_thread_try_new instead of g_thread_new

Newer API (glib 2.32) is safe, in case of error it does not
abort the process and returns error information.
Signed-off-by: Yuri Benditovich's avatarYuri Benditovich <>
Acked-by: 's avatarVictor Toso <>
parent 89a9d391
Pipeline #50846 passed with stage
in 4 minutes and 35 seconds
......@@ -473,9 +473,14 @@ gboolean spice_usb_backend_register_hotplug(SpiceUsbBackend *be,
g_atomic_int_set(&be->event_thread_run, TRUE);
be->event_thread = g_thread_new("usb_ev_thread",
be->event_thread = g_thread_try_new("usb_ev_thread",
be, error);
if (!be->event_thread) {
g_warning("Error starting event thread");
return FALSE;
return TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment