utp_match: Reduced call boost::asio::ip::address address() (#1235)

check connection ID before source address in uTP connection lookup
This commit is contained in:
Pavel Pimenov 2016-10-21 03:49:59 +03:00 committed by Arvid Norberg
parent ad6af13129
commit 8c20f4e1fd
1 changed files with 2 additions and 2 deletions

View File

@ -719,9 +719,9 @@ bool utp_incoming_packet(utp_socket_impl* s
bool utp_match(utp_socket_impl* s, udp::endpoint const& ep, std::uint16_t id) bool utp_match(utp_socket_impl* s, udp::endpoint const& ep, std::uint16_t id)
{ {
return s->m_remote_address == ep.address() return s->m_recv_id == id
&& s->m_port == ep.port() && s->m_port == ep.port()
&& s->m_recv_id == id; && s->m_remote_address == ep.address();
} }
udp::endpoint utp_remote_endpoint(utp_socket_impl* s) udp::endpoint utp_remote_endpoint(utp_socket_impl* s)