Boost logo

Boost :

From: sandeep m.v (venkata.sandeep.m_at_[hidden])
Date: 2021-08-24 19:04:49

Can someone please help me with this?

On Mon, Aug 23, 2021 at 7:54 PM sandeep m.v <venkata.sandeep.m_at_[hidden]>

> Hi All,
> I'm looking for a solution for below problem.
> We're using async_resolve() to perform DNS resolution using
> boost::asio::ip::tcp::resolver.
> In few instances probably during network connectivity issues,
> async_resolve is taking more time.
> When our application timeouts in 15seconds while waiting for DNS
> resolution, cancel() is called on resolver. But, that doesn't callback to
> resolve handle immediately.
> When I tried to search for this, it looks like, when a cancel() is called
> on resolver, that doesn't cancel ongoing actual resolution but may cancel
> if there are any other pending asynchronous action.
> It's taking 40seconds at times to call resolve handler even when failed to
> resolve host and even after calling cancel on it.
> My application waits until resolve handler is called after cancel() to
> proceed further processing.
> Is it possible to stop that async_resolve() and get callback to resolve
> handle immediately after cancel()?
> If that's impossible, is there a way that we can stop that doesn't
> callback resolve handler later? Is it possible to close underlying socket
> related to async_resolve from my application?
> Thank you in advance.
> Regards,
> Sandeep

Mob# 9000707098

Boost list run by bdawes at, gregod at, cpdaniel at, john at