diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index cf834e833..61e04f5c1 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -194,6 +194,7 @@ namespace libtorrent void ip_filter_updated() { m_policy.ip_filter_updated(); } + void set_error(std::string const& msg) { m_error = msg; } bool has_error() const { return !m_error.empty(); } void pause(); void resume(); diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index da82bbf15..8f69665fa 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2847,6 +2847,7 @@ namespace libtorrent { t->alerts().post_alert(file_error_alert(j.error_file, t->get_handle(), j.str)); } + t->set_error(j.str); t->pause(); return; }