~singpolyma/biboumi

f6d336e0f2405954728b962b115957b6f7fe02c7 — Stephen Paul Weber 9 months ago 1222335 + 18b6006
Merge branch 'master' of https://git.louiz.org/biboumi

* 'master' of https://git.louiz.org/biboumi:
  Follow-up of the previous on: also catch that on recv events
  Catch all botan exception when sending data, not just TLS
1 files changed, 2 insertions(+), 2 deletions(-)

M src/network/tcp_socket_handler.cpp
M src/network/tcp_socket_handler.cpp => src/network/tcp_socket_handler.cpp +2 -2
@@ 194,7 194,7 @@ void TCPSocketHandler::send_data(std::string&& data)
  if (this->use_tls)
    try {
      this->tls_send(std::move(data));
    } catch (const Botan::TLS::TLS_Exception& e) {
    } catch (const Botan::Exception& e) {
      this->on_connection_close("TLS error: "s + e.what());
      this->close();
      return ;


@@ 261,7 261,7 @@ void TCPSocketHandler::tls_recv()
      const bool was_active = this->tls->is_active();
      try {
        this->tls->received_data(recv_buf, static_cast<size_t>(size));
      } catch (const Botan::TLS::TLS_Exception& e) {
      } catch (const Botan::Exception& e) {
        // May happen if the server sends malformed TLS data (buggy server,
        // or more probably we are just connected to a server that sends
        // plain-text)