Ignore:
Timestamp:
Apr 23, 2000, 5:55:52 PM (25 years ago)
Author:
sandervl
Message:

don't send FD_CLOSE ack when select returns and there's no data to be read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wsock32/asyncapi.cpp

    r3265 r3439  
    1 /* $Id: asyncapi.cpp,v 1.5 2000-03-28 19:10:09 sandervl Exp $ */
     1/* $Id: asyncapi.cpp,v 1.6 2000-04-23 15:55:52 sandervl Exp $ */
    22
    33/*
     
    473473                case SOCECONNRESET:
    474474                case SOCEPIPE:
    475                         if(lEventsPending & FD_CLOSE)
     475                        if(lEventsPending & FD_CLOSE) {
     476                                dprintf(("FD_CLOSE; broken connection"));
    476477                                AsyncNotifyEvent(pThreadParm, FD_CLOSE, WSAECONNRESET);
     478                        }
    477479
    478480                        //remote connection broken (so can't receive data anymore)
     
    482484
    483485                case SOCEINVAL:
    484                         if(lEventsPending & FD_CLOSE)
     486                        if(lEventsPending & FD_CLOSE) {
     487                                dprintf(("FD_CLOSE; SOCEINVAL"));
    485488                                AsyncNotifyEvent(pThreadParm, FD_CLOSE, selecterr);
     489                        }
    486490                        break;
    487491                default:
     
    524528                        if(lEventsPending & FD_CLOSE)
    525529                        {
     530                                dprintf(("FD_CLOSE; ioctl; socket error"));
    526531                                AsyncNotifyEvent(pThreadParm, FD_CLOSE, NO_ERROR);
    527532                                //remote connection broken (so can't receive data anymore)
     
    552557                        AsyncNotifyEvent(pThreadParm, FD_READ, NO_ERROR);
    553558                }
     559#if 0
     560//SvL: This generates FD_CLOSE messages when the connection is just fine
     561//     (recv executed in another thread when select returns)
    554562                else
    555563                if((lEventsPending & FD_CLOSE) && (state == 0 && bytesread == 0)) {
     564                        dprintf(("FD_CLOSE; state == 0 && bytesread == 0"));
    556565                        AsyncNotifyEvent(pThreadParm, FD_CLOSE, NO_ERROR);
    557566                }
     567#endif
    558568        }
    559569        if(ready(noexcept))
Note: See TracChangeset for help on using the changeset viewer.