Changeset 10821


Ignore:
Timestamp:
05/25/11 14:46:05 (13 years ago)
Author:
tbretz
Message:
Removed the second HandleReadTimeout
File:
1 edited

Legend:

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

    r10816 r10821  
    255255        Cmd(FAD::kCmdTriggerLine, true);
    256256        Cmd(FAD::kCmdSingleTrigger);
    257     }
    258 
    259     void HandleReadTimeout(const bs::error_code &error)
    260     {
    261         /*
    262         return;
    263         Warn("Reading header timed-out... restarting.");
    264         StartReadHeader();
    265         return;
    266          */
    267         if (error && error!=ba::error::basic_errors::operation_aborted)
    268         {
    269             ostringstream str;
    270             str << "Read timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
    271             Error(str);
    272 
    273             PostClose();
    274             return;
    275 
    276         }
    277 
    278         if (!is_open())
    279         {
    280             // For example: Here we could schedule a new accept if we
    281             // would not want to allow two connections at the same time.
    282             return;
    283         }
    284 
    285         // Check whether the deadline has passed. We compare the deadline
    286         // against the current time since a new asynchronous operation
    287         // may have moved the deadline before this actor had a chance
    288         // to run.
    289         if (fInTimeout.expires_at() > ba::deadline_timer::traits_type::now())
    290             return;
    291 
    292         Error("Timeout reading data from "+URL());
    293 
    294         PostClose();
    295257    }
    296258
Note: See TracChangeset for help on using the changeset viewer.