FACT++  1.0
void ConnectionWeather::HandleRequest ( const bs::error_code &  error)
inlineprotected

Definition at line 298 of file tngweather.cc.

References Error(), and str.

299  {
300  // 125: Operation canceled (bs::error_code(125, bs::system_category))
301  if (error && error!=ba::error::basic_errors::operation_aborted)
302  {
303  ostringstream str;
304  str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
305  Error(str);
306 
307  PostClose(false);
308  return;
309  }
310 
311  if (!is_open())
312  {
313  // For example: Here we could schedule a new accept if we
314  // would not want to allow two connections at the same time.
315  PostClose(true);
316  return;
317  }
318 
319  // Check whether the deadline has passed. We compare the deadline
320  // against the current time since a new asynchronous operation
321  // may have moved the deadline before this actor had a chance
322  // to run.
323  if (fKeepAlive.expires_at() > ba::deadline_timer::traits_type::now())
324  return;
325 
326  Request();
327  }
char str[80]
Definition: test_client.c:7
ba::deadline_timer fKeepAlive
Error()
Definition: HeadersFTM.h:197

+ Here is the call graph for this function: