Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] SSL async_shutdown() never finishes if called when async_read_some() is in progress
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2018-04-08 23:44:25


On 7/04/2018 19:02, Alexander D. wrote:
> OK, after delving into the asio::ssl code, I finally managed to do
this by closing the underlying socket when async_read_some() finishes
with an error.

Closing the socket on read error is fairly standard practice. Otherwise
you have a socket that you're not reading from (which is generally
undesirable) or will be endlessly spinning with read errors (if you try
to restart the read, since most errors are non-recoverable).


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