Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dco-win: fix reconnect with dco-win driver
DCO device is "exclusive" device, meaning that only one app at the time can access it and device is considered opened until pending IO is complete. start_impl_() might be called on reconnect, in the same stack with closing device handle. Closing handle also triggers completion of pending IO, such as async read. However this happens in the next iteration of ASIO even loop. Therefore we defer opening DCO device (i.e. calling start_impl_) to let ASIO complete pending IO. Note that this is not required when async resolve is performed, since this implies deferring. Signed-off-by: Lev Stipakov <[email protected]>
- Loading branch information