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

Definition at line 163 of file pwrctrl.cc.

References Error(), and str.

Referenced by Request().

164  {
165  // 125: Operation canceled (bs::error_code(125, bs::system_category))
166  if (error && error!=ba::error::basic_errors::operation_aborted)
167  {
168  ostringstream str;
169  str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
170  Error(str);
171 
172  PostClose(false);
173  return;
174  }
175 
176  if (!is_open())
177  {
178  // For example: Here we could schedule a new accept if we
179  // would not want to allow two connections at the same time.
180  PostClose(true);
181  return;
182  }
183 
184  // Check whether the deadline has passed. We compare the deadline
185  // against the current time since a new asynchronous operation
186  // may have moved the deadline before this actor had a chance
187  // to run.
188  if (fKeepAlive.expires_at() > ba::deadline_timer::traits_type::now())
189  return;
190 
191  Request();
192  }
char str[80]
Definition: test_client.c:7
Error()
Definition: HeadersFTM.h:197
boost::asio::deadline_timer fKeepAlive
Definition: pwrctrl.cc:161

+ Here is the call graph for this function:

+ Here is the caller graph for this function: