Windows usb: don't try to resume thread if shut down in callback.

This commit is contained in:
Martin Ling 2013-12-22 17:38:24 +00:00
parent 6640324f7f
commit 34ea7f9695
1 changed files with 5 additions and 2 deletions

View File

@ -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);
if (ctx->usb_thread_running) {
ResetEvent(ctx->usb_event);
g_mutex_unlock(&ctx->usb_mutex);
}
return ret;
}