FACT++  1.0
void ConnectionAgilent::HandleStatusTimer ( const bs::error_code &  error)
inlineprotected

Definition at line 61 of file agilentctrl.cc.

References Error(), and str.

Referenced by RequestStatus().

62  {
63  // 125: Operation canceled (bs::error_code(125, bs::system_category))
64  if (error && error!=ba::error::basic_errors::operation_aborted)
65  {
66  ostringstream str;
67  str << "Status request timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
68  Error(str);
69 
70  PostClose(false);
71  return;
72  }
73 
74  if (!is_open())
75  {
76  // For example: Here we could schedule a new accept if we
77  // would not want to allow two connections at the same time.
78  PostClose(true);
79  return;
80  }
81 
82  // Check whether the deadline has passed. We compare the deadline
83  // against the current time since a new asynchronous operation
84  // may have moved the deadline before this actor had a chance
85  // to run.
86  if (fTimeout.expires_at() > ba::deadline_timer::traits_type::now())
87  return;
88 
89  RequestStatus();
90  }
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
boost::asio::deadline_timer fTimeout
Definition: agilentctrl.cc:35

+ Here is the call graph for this function:

+ Here is the caller graph for this function: