USBHost usb.Task() takes 5 secs after a few calls

I'm trying to use the USBHost KeyboardController.h library on an Arduino DUE. The example 'keyboard controller' sketch works perfect with a normal USB keyboard attached to the native USB port on the DUE. But after about 10 calls to the usb.Task() function, the calls start taking forever (5 secs!) to return. I checked it with millis() and it is eating 5000 millies before returning. The first 10 calls are as perfect, very fast but then everything drags down to a snails pace. Even when slow, the library is properly returning key strokes.

I'll post the code, but it is directly from the USBHost examples.

Has anyone seen this please?
How can I fix it?

I found someone with a solution.
Go add this line to your hidboot.h header file and the 5 sec timeout is scrapped

KeyboardController.ino (1.69 KB)

hidboot.jpg