fix BlobFile._close_file

This commit is contained in:
Jack Robison 2017-08-15 10:53:19 -04:00 committed by Alex Grintsvayg
parent 518146396c
commit 5d24f75ce2
2 changed files with 8 additions and 1 deletions

View file

@ -14,6 +14,12 @@ at anytime.
### Fixed
*
* Fixed reflector server blocking the `received_blob` reply on the server announcing the blob to the dht
* Fixed non-blocking call in `BlobFile._close_writer`
* Fixed incorrect formatting of "amount" fields
* Fixed handling of SIGINT, SIGTERM.
* Fixed shutdown sequence
* Fix error when resolving an integer
*
### Deprecated

View file

@ -273,12 +273,13 @@ class BlobFile(HashBlob):
file_handle.close()
self.readers -= 1
@defer.inlineCallbacks
def _close_writer(self, writer):
if writer.write_handle is not None:
log.debug("Closing %s", str(self))
name = writer.write_handle.name
writer.write_handle.close()
threads.deferToThread(os.remove, name)
yield threads.deferToThread(os.remove, name)
writer.write_handle = None
def _save_verified_blob(self, writer):