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

Definition at line 131 of file Connection.cc.

References Error(), and str.

Referenced by AsyncWait(), and HandleSentData().

132 {
133  if (error==ba::error::basic_errors::operation_aborted)
134  return;
135 
136  // 125: Operation canceled (bs::error_code(125, bs::system_category))
137  if (error)
138  {
139  ostringstream str;
140  str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
141  Error(str);
142 
143  CloseImp();
144  return;
145  }
146 
147  if (!is_open())
148  {
149  // For example: Here we could schedule a new accept if we
150  // would not want to allow two connections at the same time.
151  return;
152  }
153 
154  // Check whether the deadline has passed. We compare the deadline
155  // against the current time since a new asynchronous operation
156  // may have moved the deadline before this actor had a chance
157  // to run.
158  if (fOutTimeout.expires_at() > ba::deadline_timer::traits_type::now())
159  return;
160 
161  Error("fOutTimeout has expired, writing data to "+URL());
162 
163  CloseImp();
164 }
char str[80]
Definition: test_client.c:7
void CloseImp(bool restart=true)
Definition: Connection.cc:89
std::string URL() const
Definition: Connection.h:151
int Error(const std::string &str)
Definition: MessageImp.h:49
boost::asio::deadline_timer fOutTimeout
Definition: Connection.h:39

+ Here is the call graph for this function:

+ Here is the caller graph for this function: