Ticket #4350: mythxml_poss_fix.diff

File mythxml_poss_fix.diff, 1.3 KB (added by stuartm, 12 years ago)
  • mythtv/libs/libmythupnp/bufferedsocketdevice.cpp

     
    382382
    383383    if (nBytes == 0)
    384384    {
    385 /*
    386         The following code is a possible workaround to the lost request problem
    387         I just hate looping too much to put it in.  I believe there is something
    388         I'm missing that is causing the lost packets... Just need to find it.
    389385
     386        // The following code is a possible workaround to the lost request problem
     387        // I just hate looping too much to put it in.  I believe there is something
     388        // I'm missing that is causing the lost packets... Just need to find it.
     389
    390390        bTimeout      = true;
    391391        int    nCount = 0;
    392392        int    msWait = msecs / 100;
    393        
     393
    394394        while (((nBytes = ReadBytes()) == 0 ) &&
    395395               (nCount++              < 100 ) &&
    396396                bTimeout                      &&
     
    401401            usleep( 1000 );  // should be some multiple of msWait.
    402402
    403403        }
    404     }
    405 */
     404
    406405        // -=>TODO: Override the timeout to 1 second... Closes connection sooner
    407406        //          to help recover from lost requests.  (hack until better fix found)
    408407