Skip to content

Commit 6ba8e5d

Browse files
geoffjukeswillmcgugan
authored andcommitted
Call self.ftp.voidresp() before closing write_conn (#242)
* Call `self.ftp.voidresp()` before closing `write_conn` * Add credit * Add CHANGELOG entry
1 parent 3d5c747 commit 6ba8e5d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [Unreleased]
8+
9+
### Fixed
10+
11+
- Incomplete FTPFile.write when using `workers` @geoffjukes
712

813
## [2.1.2] - 20180-11-10
914

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Credits
9696
* [Will McGugan](https://github.com/willmcgugan)
9797
* [Martin Larralde](https://github.com/althonos)
9898
* [Giampaolo](https://github.com/gpcimino) for `copy_if_newer` and ftp fixes.
99+
* [Geoff Jukes](https://github.com/geoffjukes) for ftp fixes.
99100

100101
PyFilesystem2 owes a massive debt of gratitude to the following
101102
developers who contributed code and ideas to the original version.

fs/ftpfs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def close(self):
190190
if self._write_conn is not None:
191191
self._write_conn.close()
192192
self._write_conn = None
193+
self.ftp.voidresp() # Ensure last write completed
193194
if self._read_conn is not None:
194195
self._read_conn.close()
195196
self._read_conn = None

0 commit comments

Comments
 (0)