[#2738] [Core] Fix illegal argument with torrent_handle.set_max_connections

This commit is contained in:
Calum Lind 2015-11-15 14:17:00 +00:00
parent 83cecc0c09
commit a58ce30e7b

View File

@ -249,6 +249,10 @@ class Torrent(object):
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.handle.set_max_connections(max_connections)