mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-05 08:03:40 +00:00
upnp fixes
This commit is contained in:
parent
c06b63b027
commit
680826e969
@ -659,7 +659,7 @@ void upnp::on_upnp_xml(asio::error_code const& e
|
||||
d.upnp_connection.reset();
|
||||
}
|
||||
|
||||
if (e)
|
||||
if (e && e != asio::error::eof)
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
@ -672,7 +672,16 @@ void upnp::on_upnp_xml(asio::error_code const& e
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== incomplete http message" << std::endl;
|
||||
<< " <== error while fetching control url: incomplete http message" << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (p.status_code() != 200)
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== error while fetching control url: " << p.message() << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@ -791,7 +800,7 @@ void upnp::on_upnp_map_response(asio::error_code const& e
|
||||
d.upnp_connection.reset();
|
||||
}
|
||||
|
||||
if (e)
|
||||
if (e && e != asio::error::eof)
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
@ -824,7 +833,17 @@ void upnp::on_upnp_map_response(asio::error_code const& e
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== incomplete http message" << std::endl;
|
||||
<< " <== error while adding portmap: incomplete http message" << std::endl;
|
||||
#endif
|
||||
m_devices.erase(d);
|
||||
return;
|
||||
}
|
||||
|
||||
if (p.status_code() != 200)
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== error while adding portmap: " << p.message() << std::endl;
|
||||
#endif
|
||||
m_devices.erase(d);
|
||||
return;
|
||||
@ -933,7 +952,7 @@ void upnp::on_upnp_unmap_response(asio::error_code const& e
|
||||
d.upnp_connection.reset();
|
||||
}
|
||||
|
||||
if (e)
|
||||
if (e && e != asio::error::eof)
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
@ -945,11 +964,21 @@ void upnp::on_upnp_unmap_response(asio::error_code const& e
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== incomplete http message" << std::endl;
|
||||
<< " <== error while deleting portmap: incomplete http message" << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (p.status_code() != 200)
|
||||
{
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== error while deleting portmap: " << p.message() << std::endl;
|
||||
#endif
|
||||
m_devices.erase(d);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef TORRENT_UPNP_LOGGING
|
||||
m_log << time_now_string()
|
||||
<< " <== unmap response: " << std::string(p.get_body().begin, p.get_body().end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user