<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2234,9 +2234,10 @@ class BTClient:
       if not (info_hash in self.torrents):
          raise ValueError('Not tracking torrent with info_hash {0!a}.'.format(info_hash))
       bth = self.torrents[info_hash]
-      bth.close()
-      self.bth_archiver.bth_archive(bth)
+      bth.data_transfers_stop()
+      self.bth_archiver.bth_archive(bth) # can fail if we're out of disk space
       self.bt_stats_tracker.bth_process(bth)
+      bth.close()
       del(self.torrents[info_hash])
       self.torrent_infohashes_update()
       return bth</diff>
      <filename>src/liasis/bt_client.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e308909bec0c6aa511060bfcb1bcd7f4421a1a30</id>
    </parent>
  </parents>
  <author>
    <name>Sebastian Hagen</name>
    <email>sebastian_hagen@memespace.net</email>
  </author>
  <url>http://github.com/sh01/liasis/commit/20850348a1c37a6b066e0348a96674c6f393f126</url>
  <id>20850348a1c37a6b066e0348a96674c6f393f126</id>
  <committed-date>2009-04-01T08:40:11-07:00</committed-date>
  <authored-date>2009-04-01T08:40:11-07:00</authored-date>
  <message>Liasis: Modify BTH closing to deal with write errors to the FS used for torrent archival (e.g. due to insufficient disk space) somewhat more gracefully.</message>
  <tree>190633bd757d33c97cecf402c750ea2dad21a5ce</tree>
  <committer>
    <name>Sebastian Hagen</name>
    <email>sebastian_hagen@memespace.net</email>
  </committer>
</commit>
