Boost logo

Boost :

Subject: Re: [boost] [asio]How add a timeout to asio connection?
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-06-25 09:42:09


On 06/25/2013 02:51 PM, Renato Forti wrote:
> void check_deadline()

The timer handle must take a boost::system::error_code as argument, and
you should check this for operation_aborted.

> The problem is that now the timeout expires even if the connection to the
> server occurs. What is wrong?

You do not call deadline_.cancel() in handle_connect().


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk