VirtualBox

Changeset 31189 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jul 29, 2010 7:23:48 AM (14 years ago)
Author:
vboxsync
Message:

Runtime/sockets: Don't switch back to blocking mode if the socket is currently operated in non-blocking mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/socket.cpp

    r31122 r31189  
    13611361            pThis->fSubscribedEvts = 0;
    13621362
    1363             u_long fNonBlocking = 0;
    1364             int rc2 = ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking);
    1365             if (rc2 != 0)
     1363            /*
     1364             * Don't switch back to blocking mode if the socket is currently
     1365             * operated in non-blocking mode.
     1366             */
     1367            if (pThis->fBlocking)
    13661368            {
    1367                 rc = rtSocketError();
    1368                 AssertMsgFailed(("%Rrc; rc2=%d\n", rc, rc2));
     1369                u_long fNonBlocking = 0;
     1370                int rc2 = ioctlsocket(pThis->hNative, FIONBIO, &fNonBlocking);
     1371                if (rc2 != 0)
     1372                {
     1373                    rc = rtSocketError();
     1374                    AssertMsgFailed(("%Rrc; rc2=%d\n", rc, rc2));
     1375                }
    13691376            }
    13701377        }
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