timer.cancel();
}
+ void
+ time_out()
+ {
+ timed_out = true;
+ change_status(status::closed);
+ close_socket(get_lowest_layer(stream()));
+ }
+
// Called just before sending
// the first frame of each message
void
}
else
{
- BOOST_ASSERT(! is_timer_set());
+ // VFALCO This assert goes off when there's also
+ // a pending read with the timer set. The bigger
+ // fix is to give close its own timeout, instead
+ // of using the handshake timeout.
+ // BOOST_ASSERT(! is_timer_set());
}
break;
switch(impl.status_)
{
case status::handshake:
- impl.timed_out = true;
- close_socket(get_lowest_layer(impl.stream()));
+ impl.time_out();
return;
case status::open:
return;
}
- // timeout
- impl.timed_out = true;
- close_socket(get_lowest_layer(impl.stream()));
+ impl.time_out();
return;
case status::closing:
- impl.timed_out = true;
- close_socket(get_lowest_layer(impl.stream()));
+ impl.time_out();
return;
case status::closed: