make sure the InputStream is fully disconnected