Skip to content

Commit

Permalink
Try to fix issue zaphoyd#599 with an untested patch
Browse files Browse the repository at this point in the history
This might fix issue zaphoyd#599, but I have no clues about what does it mean
  • Loading branch information
LocutusOfBorg authored Nov 1, 2016
1 parent 378437a commit a110332
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions websocketpp/transport/asio/security/tls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,13 @@ class connection : public lib::enable_shared_from_this<connection> {
template <typename ErrorCodeType>
lib::error_code translate_ec(ErrorCodeType ec) {
if (ec.category() == lib::asio::error::get_ssl_category()) {
#if defined SSL_R_SHORT_READ
if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
return make_error_code(transport::error::tls_short_read);
#else
if (ERR_GET_REASON(ec.value()) == boost::asio::ssl::error::stream_truncated) {
return make_error_code(boost::asio::ssl::error::stream_truncated);
#endif
} else {
// We know it is a TLS related error, but otherwise don't know
// more. Pass through as TLS generic.
Expand Down

0 comments on commit a110332

Please # to comment.