diff options
author | Josh Gao <jmgao@google.com> | 2019-03-26 18:47:45 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2019-03-27 18:04:45 +0000 |
commit | 19dc2963057bda67f30adcfe1bf70b533f7310ca (patch) | |
tree | 2ee00b986cbd13feaaa5b35f4f0d158f6c595194 /libutils/Mutex_test.cpp | |
parent | 10533c57ed6b3727d504f1936669f0035f1f9de4 (diff) |
adbd: wait for FUNCTIONFS_BIND for up to a second, then retry.
Occasionally, after we open the functionfs endpoint and write our
descriptors to it, we end up in a state where we never receive any
events from ep0, presumably due to a race against some other part of
the system, since adding sleeps reduces the likelihood. Add an
(arbitrarily chosen) timeout for the initial FUNCTIONFS_BIND we read,
and retry on failure.
Bug: http://b/128679787
Test: unplug and replug a blueline 14,000 times with a usb switch board
Change-Id: I4b3d5d552179ee7f3fefcc15f9575f793926f784
Diffstat (limited to 'libutils/Mutex_test.cpp')
0 files changed, 0 insertions, 0 deletions