diff options
author | Andrew Resch <andrewresch@gmail.com> | 2008-10-07 08:54:19 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2008-10-07 08:54:19 +0000 |
commit | 8d10642ec7d393f1a972ac6a0a641b6037006f67 (patch) | |
tree | f1d5bea45d798e3adbb7848fba56da9ad3bd4147 | |
parent | 76eac8b51cfe8fcc6a7f96deaa82f55fd061eee1 (diff) | |
download | deluge-8d10642ec7d393f1a972ac6a0a641b6037006f67.tar.gz deluge-8d10642ec7d393f1a972ac6a0a641b6037006f67.tar.bz2 deluge-8d10642ec7d393f1a972ac6a0a641b6037006f67.zip |
Changed max half-open connections default limit to 8 on XP/2000 and 4 on
Vista
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | deluge/common.py | 7 | ||||
-rw-r--r-- | deluge/core/core.py | 3 |
3 files changed, 10 insertions, 1 deletions
@@ -7,6 +7,7 @@ Deluge 1.0.1 (In Development) the main thread from blocking and causing the daemon to freeze. * Removed the 'Maximum Connections Per Second' setting and replaced it with a default setting of 20. This should alleviate speed issues some are experiencing. + * Changed max half-open connections default limit to 8 on XP/2000 and 4 on Vista GtkUI: * Improve performance of files tab by only updating when values change diff --git a/deluge/common.py b/deluge/common.py index eb931ee5d..72787e425 100644 --- a/deluge/common.py +++ b/deluge/common.py @@ -123,6 +123,13 @@ def windows_check(): else: return False +def vista_check(): + import platform + if platform.release() == "Vista": + return True + else: + return False + def get_pixmap(fname): """Returns a pixmap file included with deluge""" return pkg_resources.resource_filename("deluge", os.path.join("data", \ diff --git a/deluge/core/core.py b/deluge/core/core.py index 054cf2cd2..59945724e 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -85,7 +85,8 @@ DEFAULT_PREFS = { "max_upload_speed": -1.0, "max_download_speed": -1.0, "max_upload_slots_global": 4, - "max_half_open_connections": -1, + "max_half_open_connections": (lambda: deluge.common.windows_check() and + (lambda: deluge.common.vista_check() and 4 or 8)() or -1)(), "max_connections_per_second": 20, "ignore_limits_on_local_network": True, "max_connections_per_torrent": -1, |