mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-09 18:14:11 +00:00
[#2738] [Core] Fix illegal argument with torrent_handle.set_max_connections
This commit is contained in:
parent
83cecc0c09
commit
a58ce30e7b
@ -249,6 +249,10 @@ class Torrent(object):
|
|||||||
|
|
||||||
|
|
||||||
def set_max_connections(self, max_connections):
|
def set_max_connections(self, max_connections):
|
||||||
|
if max_connections == 0:
|
||||||
|
max_connections = -1
|
||||||
|
elif max_connections == 1:
|
||||||
|
max_connections = 2
|
||||||
self.options["max_connections"] = int(max_connections)
|
self.options["max_connections"] = int(max_connections)
|
||||||
self.handle.set_max_connections(max_connections)
|
self.handle.set_max_connections(max_connections)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user