mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 06:32:31 +00:00
* Clear the download rate when finishing a torrent.
* Fixed torrent::set_{bind,local}_address(...) so they update
correctly.
* Tweaked the time left display, show minutes instead of seconds.
* Add earlier check on validity of the socket address of
incoming/outgoing connection.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@610 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+3
-3
@@ -245,18 +245,18 @@ Manager::receive_download_done(Download* d) {
|
||||
void
|
||||
Manager::listen_open() {
|
||||
if (m_portFirst > m_portLast)
|
||||
throw std::runtime_error("Invalid port range for listening");
|
||||
throw torrent::input_error("Invalid port range for listening");
|
||||
|
||||
if (m_portRandom) {
|
||||
int boundary = m_portFirst + random() % (m_portLast - m_portFirst + 1);
|
||||
|
||||
if (!torrent::listen_open(boundary, m_portLast) &&
|
||||
!torrent::listen_open(m_portFirst, boundary))
|
||||
throw std::runtime_error("Could not open port for listening.");
|
||||
throw torrent::input_error("Could not open/bind a port for listening.");
|
||||
|
||||
} else {
|
||||
if (!torrent::listen_open(m_portFirst, m_portLast))
|
||||
throw std::runtime_error("Could not open port for listening.");
|
||||
throw torrent::input_error("Could not open/bind a port for listening.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user