VirtualBox

Changeset 24090 in vbox for trunk


Ignore:
Timestamp:
Oct 26, 2009 4:17:35 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53968
Message:

Main/Machine: when opening a new session, don't just fail of the previous session wasn't closed completely. Better wait a little, as normally it takes much less than half a second to clean it up. The client could retry, but usually that would be much slower as the client has no knowledge about when the session is closed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r24079 r24090  
    37643764    LogFlowThisFunc(("mSession.mState=%s\n", Global::stringifySessionState(mData->mSession.mState)));
    37653765
     3766    /* Hack: in case the session is closing and there is a progress object
     3767     * which allows waiting for the session to be closed, take the opportunity
     3768     * and do a limited wait (max. 1 second). This helps a lot when the system
     3769     * is busy and thus session closing can take a little while. */
     3770    if (    mData->mSession.mState == SessionState_Closing
     3771        &&  mData->mSession.mProgress)
     3772    {
     3773        alock.leave();
     3774        mData->mSession.mProgress->WaitForCompletion(1000);
     3775        alock.enter();
     3776        LogFlowThisFunc(("after waiting: mSession.mState=%s\n", Global::stringifySessionState(mData->mSession.mState)));
     3777    }
     3778
    37663779    if (mData->mSession.mState == SessionState_Open ||
    37673780        mData->mSession.mState == SessionState_Closing)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette