Changeset 20087


Ignore:
Timestamp:
04/20/21 23:27:53 (4 years ago)
Author:
tbretz
Message:
Fixed an (un)signed comparison; in case of a bad file descriptor, it seems the connection terminated (looks like a featue of the most recent boost). trying to close the connection can produce crashes. So better avoid that.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/pwrctrl.cc

    r16727 r20087  
    8585        const QDomNodeList imageElems = doc.elementsByTagName("span");
    8686
    87         for (unsigned int i=0; i<imageElems.length(); i++)
     87        for (int i=0; i<imageElems.length(); i++)
    8888        {
    8989            const QDomElement e = imageElems.item(i).toElement();
     
    111111        if (bytes_received==0 || err)
    112112        {
    113             if (err==ba::error::eof)
     113            if (err==ba::error::eof || err==ba::error::bad_descriptor)
    114114            {
    115115                if (!fRdfData.empty())
     
    120120            // 107: Transport endpoint is not connected (bs::error_code(107, bs::system_category))
    121121            // 125: Operation canceled
    122             if (err && err!=ba::error::eof &&                     // Connection closed by remote host
     122            if (err &&
    123123                err!=ba::error::basic_errors::not_connected &&    // Connection closed by remote host
    124124                err!=ba::error::basic_errors::operation_aborted)  // Connection closed by us
    125125            {
    126126                ostringstream str;
    127                 str << "Reading from " << URL() << ": " << err.message() << " (" << err << ")";// << endl;
     127                str << "Reading[" << is_open() << "] from " << URL() << ": " << err.message() << " (" << err << ")";// << endl;
    128128                Error(str);
    129129            }
Note: See TracChangeset for help on using the changeset viewer.