When the first attempt at an open fails, the failbit is getting set, and it appears to remain set even after the subsequent open succeeds. The input operations must then be checking the failbit and just not doing anything if set. You can add a inStream.clear() call as part of your if check to clear the failbit before the next attempt at open.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.