mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
Fix #560 force an int value for global max connections
This commit is contained in:
parent
0c9a3751e4
commit
e4c72c7dce
3 changed files with 181 additions and 173 deletions
|
@ -1,3 +1,7 @@
|
|||
Deluge 1.0.4 (In Development)
|
||||
Core:
|
||||
* Fix #560 force an int value for global max connections
|
||||
|
||||
Deluge 1.0.3 (18 October 2008)
|
||||
Core:
|
||||
* Fix upnp - it should work on more routers now too
|
||||
|
|
|
@ -818,7 +818,11 @@ class Core(
|
|||
|
||||
def _on_set_max_connections_global(self, key, value):
|
||||
log.debug("max_connections_global set to %s..", value)
|
||||
self.session.set_max_connections(value)
|
||||
# Add this in to overwrite bad float values in the config, to prevent
|
||||
# future issues with 1.1
|
||||
if type(value) is not int:
|
||||
self.config[key] = int(value)
|
||||
self.session.set_max_connections(int(value))
|
||||
|
||||
def _on_set_max_upload_speed(self, key, value):
|
||||
log.debug("max_upload_speed set to %s..", value)
|
||||
|
|
|
@ -414,8 +414,8 @@ class StatusBar(component.Component):
|
|||
if widget.get_name() == _("Unlimited"):
|
||||
value = -1
|
||||
elif widget.get_name() == _("Other..."):
|
||||
value = deluge.common.show_other_dialog(
|
||||
_("Connection Limit:"), self.max_connections)
|
||||
value = int(deluge.common.show_other_dialog(
|
||||
_("Connection Limit:"), self.max_connections))
|
||||
if value == None:
|
||||
return
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue