mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
ltsync 3211
This commit is contained in:
parent
24e526ce93
commit
20751de699
2 changed files with 14 additions and 2 deletions
|
@ -57,8 +57,8 @@ namespace libtorrent
|
||||||
lru_file_entry e = *i;
|
lru_file_entry e = *i;
|
||||||
e.last_use = time_now();
|
e.last_use = time_now();
|
||||||
|
|
||||||
if (e.key != st && ((e.mode & file::rw_mask) != file::read_only
|
if (e.key != st && (e.mode != file::in
|
||||||
|| (m & file::rw_mask) != file::read_only))
|
|| m != file::in))
|
||||||
{
|
{
|
||||||
// this means that another instance of the storage
|
// this means that another instance of the storage
|
||||||
// is using the exact same file.
|
// is using the exact same file.
|
||||||
|
|
|
@ -2549,6 +2549,10 @@ namespace libtorrent
|
||||||
error_code ec;
|
error_code ec;
|
||||||
m_socket->close(ec);
|
m_socket->close(ec);
|
||||||
m_ses.close_connection(this, message);
|
m_ses.close_connection(this, message);
|
||||||
|
|
||||||
|
// we should only disconnect while we still have
|
||||||
|
// at least one reference left to the connection
|
||||||
|
TORRENT_ASSERT(refcount() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void peer_connection::set_upload_limit(int limit)
|
void peer_connection::set_upload_limit(int limit)
|
||||||
|
@ -3507,6 +3511,10 @@ namespace libtorrent
|
||||||
|
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
// keep ourselves alive in until this function exits in
|
||||||
|
// case we disconnect
|
||||||
|
boost::intrusive_ptr<peer_connection> me(self());
|
||||||
|
|
||||||
TORRENT_ASSERT(m_channel_state[download_channel] == peer_info::bw_network);
|
TORRENT_ASSERT(m_channel_state[download_channel] == peer_info::bw_network);
|
||||||
m_channel_state[download_channel] = peer_info::bw_idle;
|
m_channel_state[download_channel] = peer_info::bw_idle;
|
||||||
|
|
||||||
|
@ -3774,6 +3782,10 @@ namespace libtorrent
|
||||||
|
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
// keep ourselves alive in until this function exits in
|
||||||
|
// case we disconnect
|
||||||
|
boost::intrusive_ptr<peer_connection> me(self());
|
||||||
|
|
||||||
TORRENT_ASSERT(m_channel_state[upload_channel] == peer_info::bw_network);
|
TORRENT_ASSERT(m_channel_state[upload_channel] == peer_info::bw_network);
|
||||||
|
|
||||||
m_send_buffer.pop_front(bytes_transferred);
|
m_send_buffer.pop_front(bytes_transferred);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue