From e8e5308e6b520514ee99f0e2ed94faae7bbe39a5 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 22 Apr 2008 20:56:10 +0000 Subject: [PATCH] udp socket fix --- src/udp_socket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/udp_socket.cpp b/src/udp_socket.cpp index 6f64997a9..7d3db6531 100644 --- a/src/udp_socket.cpp +++ b/src/udp_socket.cpp @@ -24,6 +24,8 @@ udp_socket::udp_socket(asio::io_service& ios, udp_socket::callback_t const& c void udp_socket::send(udp::endpoint const& ep, char const* p, int len, asio::error_code& ec) { + if (e == asio::error::operation_aborted) return; + if (m_tunnel_packets) { // send udp packets through SOCKS5 server @@ -39,6 +41,8 @@ void udp_socket::send(udp::endpoint const& ep, char const* p, int len, asio::err void udp_socket::on_read(udp::socket* s, asio::error_code const& e, std::size_t bytes_transferred) { + if (e == asio::error::operation_aborted) return; + if (!m_callback) return; if (e)