Add read/write timeouts and avoid stuck peers
This commit is contained in:
parent
ae847ce99c
commit
9e8f235cb4
5 changed files with 59 additions and 55 deletions
|
|
@ -355,6 +355,10 @@ impl Session {
|
|||
builder.peer_connect_timeout(t);
|
||||
}
|
||||
|
||||
if let Some(t) = opts.peer_opts.unwrap_or(self.peer_opts).read_write_timeout {
|
||||
builder.peer_read_write_timeout(t);
|
||||
}
|
||||
|
||||
let handle = match builder
|
||||
.start_manager()
|
||||
.context("error starting torrent manager")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue