forked from premiere/premiere-libtorrent
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:
parent
ad6af13129
commit
8c20f4e1fd
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue