Windows usb: don't try to resume thread if shut down in callback.
This commit is contained in:
parent
6640324f7f
commit
34ea7f9695
|
@ -267,8 +267,11 @@ SR_PRIV int usb_callback(int fd, int revents, void *cb_data)
|
|||
|
||||
g_mutex_lock(&ctx->usb_mutex);
|
||||
ret = ctx->usb_cb(fd, revents, ctx->usb_cb_data);
|
||||
ResetEvent(ctx->usb_event);
|
||||
g_mutex_unlock(&ctx->usb_mutex);
|
||||
|
||||
if (ctx->usb_thread_running) {
|
||||
ResetEvent(ctx->usb_event);
|
||||
g_mutex_unlock(&ctx->usb_mutex);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue