forked from premiere/premiere-libtorrent
missing return if error in session_impl::on_port_mapping, doc typo (#2459)
This commit is contained in:
parent
98effc8d88
commit
bb409c5ee9
|
@ -141,7 +141,7 @@ namespace aux {
|
|||
// listen_socket_t should not be copied or moved because
|
||||
// references to it are held by the DHT and tracker announce
|
||||
// code. That code expects a listen_socket_t to always refer
|
||||
// to the same socket. It would be easy to accidently
|
||||
// to the same socket. It would be easy to accidentally
|
||||
// invalidate that assumption if copying or moving were allowed.
|
||||
listen_socket_t(listen_socket_t const&) = delete;
|
||||
listen_socket_t(listen_socket_t&&) = delete;
|
||||
|
|
|
@ -5413,10 +5413,14 @@ namespace {
|
|||
{
|
||||
TORRENT_ASSERT(is_single_thread());
|
||||
|
||||
if (ec && m_alerts.should_post<portmap_error_alert>())
|
||||
if (ec)
|
||||
{
|
||||
m_alerts.emplace_alert<portmap_error_alert>(mapping
|
||||
, transport, ec);
|
||||
if (m_alerts.should_post<portmap_error_alert>())
|
||||
{
|
||||
m_alerts.emplace_alert<portmap_error_alert>(mapping
|
||||
, transport, ec);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// look through our listen sockets to see if this mapping is for one of
|
||||
|
@ -5447,7 +5451,7 @@ namespace {
|
|||
else (*ls)->udp_external_port = port;
|
||||
}
|
||||
|
||||
if (!ec && m_alerts.should_post<portmap_alert>())
|
||||
if (m_alerts.should_post<portmap_alert>())
|
||||
{
|
||||
m_alerts.emplace_alert<portmap_alert>(mapping, port
|
||||
, transport, proto);
|
||||
|
|
Loading…
Reference in New Issue