Skip to content

Conversation

@fclairamb
Copy link
Owner

@fclairamb fclairamb commented Dec 17, 2020

The file transfer logic was a bit broken and could end-up performing two replies to a STOR command.

This now correctly reports:

  • errors during file transfer & write (was already supported)
  • errors during file close and transfer connection close (which is reported as an error)

Please note that this issue probably wasn't introduced by #161, it might have always existed.

Florent Clairambault added 3 commits December 17, 2020 02:09
- Adding a test around changed brought by #161.
- Changing the overall file transfer structure to pass the test
…to fix/issue-162

� Conflicts:
�	transfer_test.go
@fclairamb fclairamb marked this pull request as draft December 17, 2020 01:15
@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #202 (1a87dae) into master (c84759b) will increase coverage by 1.55%.
The diff coverage is 80.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #202      +/-   ##
==========================================
+ Coverage   71.07%   72.62%   +1.55%     
==========================================
  Files           9        9              
  Lines         999     1001       +2     
==========================================
+ Hits          710      727      +17     
+ Misses        207      194      -13     
+ Partials       82       80       -2     
Impacted Files Coverage Δ
client_handler.go 62.23% <73.33%> (+2.01%) ⬆️
handle_files.go 77.05% <82.69%> (+4.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c84759b...1a87dae. Read the comment docs.

@fclairamb fclairamb marked this pull request as ready for review December 17, 2020 01:48
@fclairamb fclairamb requested a review from drakkan December 17, 2020 01:48
@fclairamb fclairamb added the Bug label Dec 17, 2020
@fclairamb fclairamb linked an issue Dec 17, 2020 that may be closed by this pull request
@drakkan
Copy link
Collaborator

drakkan commented Dec 17, 2020

Hi,

I had a similar fix locally, the two replies to STOR were triggered as soon as I moved the transfer to a separate goroutine (to support ABOR). I merged my changes with yours, please take a look and thank you!

@fclairamb
Copy link
Owner Author

Perfect !

@fclairamb fclairamb merged commit fdb9611 into master Dec 17, 2020
@fclairamb fclairamb deleted the fix/issue-162 branch December 17, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test around #161

3 participants