Revert "Wait for device if connection is interrupted"

This reverts commit 2b521330bd22dacb938d97277b1230ef919ef640.
Revert "Revert "Wait for device if connection is interrupted""

This reverts commit ca15de3d028f212c54fa1254a2d9bc2caef4d196.