aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport')
-rw-r--r--libtransport/src/hicn/transport/core/udp_socket_connector.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libtransport/src/hicn/transport/core/udp_socket_connector.cc b/libtransport/src/hicn/transport/core/udp_socket_connector.cc
index 38945e7..99f47fe 100644
--- a/libtransport/src/hicn/transport/core/udp_socket_connector.cc
+++ b/libtransport/src/hicn/transport/core/udp_socket_connector.cc
@@ -62,7 +62,13 @@ void UdpSocketConnector::send(const uint8_t *packet, std::size_t len,
});
} else {
if (state_ == ConnectorState::CONNECTED) {
- socket_.send(asio::buffer(packet, len));
+ try {
+ socket_.send(asio::buffer(packet, len));
+ } catch (std::system_error &err) {
+ TRANSPORT_LOGE(
+ "Sending of disconnect message to forwarder failed. Reason: %s",
+ err.what());
+ }
}
}
}