FACT++  1.0
void ConnectionLid::HandleRequest ( const bs::error_code &  error)
inlineprivate

Definition at line 256 of file lidctrl.cc.

References Error(), and str.

Referenced by Request().

257  {
258  // 125: Operation canceled (bs::error_code(125, bs::system_category))
259  if (error && error!=ba::error::basic_errors::operation_aborted)
260  {
261  ostringstream str;
262  str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
263  Error(str);
264 
265  PostClose(false);
266  return;
267  }
268 
269  if (!is_open())
270  {
271  // For example: Here we could schedule a new accept if we
272  // would not want to allow two connections at the same time.
273  PostClose(true);
274  return;
275  }
276 
277  // Check whether the deadline has passed. We compare the deadline
278  // against the current time since a new asynchronous operation
279  // may have moved the deadline before this actor had a chance
280  // to run.
281  if (fKeepAlive.expires_at() > ba::deadline_timer::traits_type::now())
282  return;
283 
284  Request();
285  }
void PostClose(bool restart=true)
Definition: Connection.cc:125
boost::asio::deadline_timer fKeepAlive
Definition: lidctrl.cc:232
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 Request()
Definition: lidctrl.cc:337

+ Here is the call graph for this function:

+ Here is the caller graph for this function: