- Change Summary:
-
Turns out there was no need to drain the socket before closing it at all.
IRC transfers were failing because purple_xfer was closing the connection from the sender's side
before the receiver read everything.
The solution was in two parts:- Make purple_xfer close the connections automatically only when
there is no read/write function defined in the respective protocol. - Make a read function for IRC DCC that handles a return value of 0
fromread()
gracefully.
This should be tested with more protocols to see if the transfers finish correctly.
- Make purple_xfer close the connections automatically only when
- Commits:
-
Summary ID 04c578355d4f85dcec11c148215c0176b71aea64 58121aa13583f527b4f14b8f1dc89f7b2a9be83f - Diff:
-
Revision 2 (+82 -44)
Fix hang when completing a file transfer over XMPP
Review Request #1466 — Created May 21, 2022 and submitted
The way purple_xfer_drain_socket was implemented, if the peer never close()d the connection, we would wait forever for it to be closed remotely, causing Pidgin to hang.
Tested IRC and XMPP on Windows and Linux. Transferred big and small files.
Summary | ID |
---|---|
613b2af77c7a0e32abda71c2bb9eb14942c076f9 |
- Change Summary:
-
Address issues.
- Commits:
-
Summary ID 58121aa13583f527b4f14b8f1dc89f7b2a9be83f ed91cc38f8f286a116388cf1ae23d7868d304424 - Diff:
-
Revision 3 (+92 -42)
- Change Summary:
-
Address issues.
- Commits:
-
Summary ID ed91cc38f8f286a116388cf1ae23d7868d304424 613b2af77c7a0e32abda71c2bb9eb14942c076f9 - Diff:
-
Revision 4 (+92 -42)