ytai/ioio — pull request #86 by MaxKellermann (2014-07-04 20:54:07+00:00)
Title: IOIOImpl: obey IOIOConnection.canClose()

Fixes reconnect errors in "accessory" mode. The InputStream.close()
call in IOIOProtocol.IncomingThread.run() closes the USB accessory
file descriptor without telling AccessoryConnectionBootstrap. That
class will never notice the file descriptor was invalidated, and will
repeatedly try using it, each time failing with EBADF.

By obeying IOIOConnection.canClose(), the existing file descriptor can
be reused.