From: Marcin Siodelski Date: Mon, 26 Mar 2018 13:33:40 +0000 (+0200) Subject: [5470] Do not catch specific exceptions for remote_endpoint() X-Git-Tag: trac5458a_base~32^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d275a2352b798af5e3ce491323ee6c6f74ac1998;p=thirdparty%2Fkea.git [5470] Do not catch specific exceptions for remote_endpoint() --- diff --git a/src/lib/http/client.cc b/src/lib/http/client.cc index 2bb79f37f7..d433136aa3 100644 --- a/src/lib/http/client.cc +++ b/src/lib/http/client.cc @@ -518,7 +518,7 @@ Connection::doSend() { try { socket_.asyncSend(&buf_[0], buf_.size(), socket_cb); - } catch (const std::exception& ex) { + } catch (...) { terminate(boost::asio::error::not_connected); } } @@ -532,7 +532,7 @@ Connection::doReceive() { try { socket_.asyncReceive(static_cast(input_buf_.data()), input_buf_.size(), 0, &endpoint, socket_cb); - } catch (const std::exception& ex) { + } catch (...) { terminate(boost::asio::error::not_connected); } } diff --git a/src/lib/http/connection.cc b/src/lib/http/connection.cc index 418715ea8a..59ee436b8c 100644 --- a/src/lib/http/connection.cc +++ b/src/lib/http/connection.cc @@ -101,7 +101,7 @@ HttpConnection::doRead() { socket_.asyncReceive(static_cast(buf_.data()), buf_.size(), 0, &endpoint, cb); - } catch (const std::exception& ex) { + } catch (...) { stopThisConnection(); } } @@ -129,7 +129,7 @@ HttpConnection::doWrite() { doRead(); } } - } catch (const std::exception& ex) { + } catch (...) { stopThisConnection(); } }