FACT++  1.0
void Connection::HandleConnectionTimer ( const boost::system::error_code &  error)
private

Definition at line 230 of file Connection.cc.

References Error(), and str.

Referenced by AsyncWait(), ConnectAddr(), ConnectIter(), and StartConnect().

231 {
232  if (error==ba::error::basic_errors::operation_aborted)
233  return;
234 
235  if (error)
236  {
237  ostringstream str;
238  str << "Connetion timer of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
239  Error(str);
240  }
241 
242  if (is_open())
243  {
244  // For example: Here we could schedule a new accept if we
245  // would not want to allow two connections at the same time.
246  return;
247  }
248 
249  // Check whether the deadline has passed. We compare the deadline
250  // against the current time since a new asynchronous operation
251  // may have moved the deadline before this actor had a chance
252  // to run.
253  if (fConnectionTimer.expires_at() < ba::deadline_timer::traits_type::now())
254  StartConnect();
255 }
boost::asio::deadline_timer fConnectionTimer
Definition: Connection.h:40
char str[80]
Definition: test_client.c:7
virtual void StartConnect()
Definition: Connection.cc:352
std::string URL() const
Definition: Connection.h:151
int Error(const std::string &str)
Definition: MessageImp.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function: