r260 - in /debtorrent/trunk/DebTorrent: BT1/Storage.py SocketHandler.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Fri Aug 17 02:21:10 UTC 2007


Author: camrdale-guest
Date: Fri Aug 17 02:21:10 2007
New Revision: 260

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=260
Log:
Prevent HTTP sockets from being closed due to timeout when they are just waiting for a long download.

Modified:
    debtorrent/trunk/DebTorrent/BT1/Storage.py
    debtorrent/trunk/DebTorrent/SocketHandler.py

Modified: debtorrent/trunk/DebTorrent/BT1/Storage.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/BT1/Storage.py?rev=260&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/BT1/Storage.py (original)
+++ debtorrent/trunk/DebTorrent/BT1/Storage.py Fri Aug 17 02:21:10 2007
@@ -521,8 +521,6 @@
         for l in self.working_ranges:
             self.ranges.extend(l)
         self.begins = [i[0] for i in self.ranges]
-        logger.debug('new file ranges: '+str(self.ranges))
-        logger.debug('new file begins: '+str(self.begins))
 
     def get_file_range(self, index):
         """Get the file name and range that corresponds to this piece.

Modified: debtorrent/trunk/DebTorrent/SocketHandler.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/SocketHandler.py?rev=260&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/SocketHandler.py (original)
+++ debtorrent/trunk/DebTorrent/SocketHandler.py Fri Aug 17 02:21:10 2007
@@ -554,6 +554,7 @@
                             self._close_socket(s)
                             continue
                 if (event & POLLOUT) and s.socket and not s.is_flushed():
+                    s.last_hit = clock()
                     s.try_write()
                     if s.is_flushed():
                         s.handler.connection_flushed(s)




More information about the Debtorrent-commits mailing list