|
Boost Users : |
Subject: Re: [Boost-users] Boost/Asio short read error
From: Marcin GÅogowski (M.Glogowski_at_[hidden])
Date: 2012-05-22 04:45:58
Hi, thank you for help.
In the Asio mailing group another man wrote:
"Actually, it is not something to worry about.
Normally this error code is returned when the SSL client does not close its connection properly, i.e. without calling SSL_shutdown() (terminated from the task manager, for example).
The connection is closed by the client one way or another, the server can do nothing but ignore it.
You can check this error code as follows:
if (error.category() == boost::asio::error::get_ssl_category() &&
error.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)) // boost returns "short_read" wehen the peer calls SSL_shutdown() {
// the client went down abruptly
}"
What is the best way to handle the error - restart async operation or do checking as mentioned above?
Best regards
Marcin
Dom Maklerski Banku Ochrony Årodowiska SpóÅka Akcyjna
ul. MarszaÅkowska 78/80 / 00-517 Warszawa
wpisana w Rejestrze PrzedsiÄbiorców prowadzonym przez
SÄ
d Rejonowy dla m. st. Warszawy XII WydziaÅ Gospodarczy Krajowego Rejestru SÄ
dowego
pod numerem: KRS 0000048901 / NIP 526-10-26-828
KapitaÅ zakÅadowy w wysokoÅci 21.551.200zÅ wpÅacony w caÅoÅci.
P - Nie drukuj tej wiadomoÅci, jeÅli to nie jest konieczne.
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