forked from premiere/premiere-libtorrent
rate_limited_udp_socket fixes
This commit is contained in:
parent
9bba20cdb4
commit
3ed38059aa
|
@ -120,6 +120,7 @@ namespace libtorrent
|
|||
void set_rate_limit(int limit) { m_rate_limit = limit; }
|
||||
bool can_send() const { return int(m_queue.size()) >= m_queue_size_limit; }
|
||||
bool send(udp::endpoint const& ep, char const* p, int len, error_code& ec);
|
||||
void close();
|
||||
|
||||
private:
|
||||
struct queued_packet
|
||||
|
|
|
@ -588,3 +588,9 @@ void rate_limited_udp_socket::on_tick(error_code const& e)
|
|||
}
|
||||
}
|
||||
|
||||
void rate_limited_udp_socket::close()
|
||||
{
|
||||
m_timer.cancel();
|
||||
udp_socket::close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue