VirtualBox

Changeset 92271 in vbox for trunk


Ignore:
Timestamp:
Nov 8, 2021 2:47:09 PM (3 years ago)
Author:
vboxsync
Message:

Main/Session::getRemoteConsole: Don't assert here as there seems to be some kind of shutdown race when running stuff in the validation kit with the GUI as frontend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/SessionImpl.cpp

    r91312 r92271  
    265265
    266266#ifndef VBOX_COM_INPROC_API_CLIENT
    267     AssertMsgReturn(mType == SessionType_WriteLock && !!mConsole,
    268                     ("This is not a direct session!\n"),
    269                     VBOX_E_INVALID_OBJECT_STATE);
    270 
    271     /* return a failure if the session already transitioned to Closing
    272      * but the server hasn't processed Machine::OnSessionEnd() yet. */
    273     if (mState != SessionState_Locked)
     267    if (mType == SessionType_WriteLock && !!mConsole)
     268    {
     269        /* return a failure if the session already transitioned to Closing
     270         * but the server hasn't processed Machine::OnSessionEnd() yet. */
     271        if (mState == SessionState_Locked)
     272        {
     273            mConsole.queryInterfaceTo(aConsole.asOutParam());
     274
     275            LogFlowThisFuncLeave();
     276            return S_OK;
     277        }
    274278        return VBOX_E_INVALID_VM_STATE;
    275 
    276     mConsole.queryInterfaceTo(aConsole.asOutParam());
    277 
    278     LogFlowThisFuncLeave();
    279 
    280     return S_OK;
     279    }
     280    return setError(VBOX_E_INVALID_OBJECT_STATE, "This is not a direct session");
    281281
    282282#else  /* VBOX_COM_INPROC_API_CLIENT */
Note: See TracChangeset for help on using the changeset viewer.

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