Boost logo

Boost Users :

From: Fariya F (fariya.fatima03_at_[hidden])
Date: 2020-12-30 14:47:36


Hi,

Thanks. A couple of more questions:
a) Could you help me with a sample code which handles shutdown gracefully
(async shutdown + timer) for iterative servers?
b) I have also seen issues where the code hangs just like the shutdown()
when I invoke socket_.lowest_layer().cancel(). Is this expected?
c) Is this what is the code to be put in the async shutdown handler?
     socket_.lowest_layer().close(ignored_ec);

Regards,
Fariya

On Wed, Dec 30, 2020 at 8:04 PM Vinnie Falco <vinnie.falco_at_[hidden]> wrote:

> On Wed, Dec 30, 2020 at 6:27 AM Fariya F via Boost-users
> <boost-users_at_[hidden]> wrote:
> > I see that the call to ssl socket member function shutdown() blocks
> sometimes forever
>
> You are mixing synchronous and asynchronous operations on the same
> socket, which is generally disallowed. Use async_shutdown instead, and
> also use a timer to close the socket after some time period (say, 30
> seconds).
>
> Regards
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net