FACT++  1.0
void ConnectionDrive::HandleKeepAlive ( const bs::error_code &  error)
inlineprotected

Definition at line 559 of file cosyctrl.cc.

References Error(), and str.

Referenced by KeepAlive().

560  {
561  // 125: Operation canceled (bs::error_code(125, bs::system_category))
562  if (error && error!=ba::error::basic_errors::operation_aborted)
563  {
564  ostringstream str;
565  str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
566  Error(str);
567 
568  PostClose(false);
569  return;
570  }
571 
572  if (!is_open())
573  {
574  // For example: Here we could schedule a new accept if we
575  // would not want to allow two connections at the same time.
576  return;
577  }
578 
579  // Check whether the deadline has passed. We compare the deadline
580  // against the current time since a new asynchronous operation
581  // may have moved the deadline before this actor had a chance
582  // to run.
583  if (fKeepAlive.expires_at() > ba::deadline_timer::traits_type::now())
584  return;
585 
586  KeepAlive();
587  }
boost::asio::deadline_timer fKeepAlive
Definition: cosyctrl.cc:548
void PostClose(bool restart=true)
Definition: Connection.cc:125
char str[80]
Definition: test_client.c:7
std::string URL() const
Definition: Connection.h:151
int Error(const std::string &str)
Definition: MessageImp.h:49
void KeepAlive()
Definition: cosyctrl.cc:550

+ Here is the call graph for this function:

+ Here is the caller graph for this function: