Fix file transfers failing at 99% over IRC
Review Request #1385 — Created April 11, 2022 and submitted — Latest diff uploaded
Fix file transfers failing at 99% over IRC
File transfers over IRC sometimes failed because the sender
close()
d the socket before reading everything from it, resulting in a TCP RST packet being sent, which was interpreted by the receiver as a problem with the connection, sometimes dropping the last few bytes of the file as a result.
This patch reads everything from the socket before closing, thus avoiding the RST packet issue.
Tested on Windows, Linux, Windows-to-Linux and vice-versa IRC file transfers.