FACT++  1.0
void ConnectionFTM::HandleReadTimeout ( const bs::error_code &  error)
inlineprivate

Definition at line 389 of file ftmctrl.cc.

References Error(), and str.

390  {
391  if (error==ba::error::basic_errors::operation_aborted)
392  return;
393 
394  if (error)
395  {
396  ostringstream str;
397  str << "Read timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
398  Error(str);
399 
400  PostClose();
401  return;
402 
403  }
404 
405  if (!is_open())
406  {
407  // For example: Here we could schedule a new accept if we
408  // would not want to allow two connections at the same time.
409  return;
410  }
411 
412  // Check whether the deadline has passed. We compare the deadline
413  // against the current time since a new asynchronous operation
414  // may have moved the deadline before this actor had a chance
415  // to run.
416  if (fInTimeout.expires_at() > ba::deadline_timer::traits_type::now())
417  return;
418 
419  Error("Timeout ("+to_simple_string(fInTimeout.expires_from_now())+") reading data from "+URL());
420 
421  PostClose();
422  }
char str[80]
Definition: test_client.c:7
Error()
Definition: HeadersFTM.h:197

+ Here is the call graph for this function: