udp socket fix

This commit is contained in:
Arvid Norberg 2008-04-22 20:56:10 +00:00
parent da72fe56e5
commit e8e5308e6b
1 changed files with 4 additions and 0 deletions

View File

@ -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)