forked from LBRYCommunity/lbry-sdk
fix BlobFile._close_file
This commit is contained in:
parent
518146396c
commit
5d24f75ce2
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue