From 0232fc559cdacb9561f982dd6d28feb4435b3e4e Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Sat, 21 Nov 2009 17:01:32 +0000 Subject: [PATCH] Increase libusb_handle_events() timeout to 60 seconds The internal timing seems to be working, this will be a better test of it before we make this timeout unlimited. --- libusb/io.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libusb/io.c b/libusb/io.c index f6a7e23..387be4c 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -1958,11 +1958,10 @@ retry: } /** \ingroup poll - * Handle any pending events in blocking mode with a sensible timeout. This - * timeout is currently hardcoded at 2 seconds but we may change this if we - * decide other values are more sensible. For finer control over whether this - * function is blocking or non-blocking, or the maximum timeout, use - * libusb_handle_events_timeout() instead. + * Handle any pending events in blocking mode. There is currently a timeout + * hardcoded at 60 seconds but we plan to make it unlimited in future. For + * finer control over whether this function is blocking or non-blocking, or + * for control over the timeout, use libusb_handle_events_timeout() instead. * * \param ctx the context to operate on, or NULL for the default context * \returns 0 on success, or a LIBUSB_ERROR code on failure @@ -1970,7 +1969,7 @@ retry: API_EXPORTED int libusb_handle_events(libusb_context *ctx) { struct timeval tv; - tv.tv_sec = 2; + tv.tv_sec = 60; tv.tv_usec = 0; return libusb_handle_events_timeout(ctx, &tv); } -- 2.7.4