Close socks5 connection when done sending data

Sometimes even in Conversations-to-Conversations I see symptoms like receiver
says 99% done, sender says 100% done, hangs like that and then file transfer
fails.

I was having this issue fairly reliably between my emulator and my test device.
Adding this close caused the transfer to succeed 100% of the time.  I'm not sure
why the receiver didn't read all the data properly without the close, but this
fixes it.
This commit is contained in:
Stephen Paul Weber 2022-03-09 23:00:47 -05:00
parent 69a174f43f
commit bb1e1a8b24
No known key found for this signature in database
GPG Key ID: D11C2911CE519CDE
1 changed files with 1 additions and 0 deletions

View File

@ -151,6 +151,7 @@ public class JingleFileTransferConnection extends AbstractJingleConnection imple
if (message.getEncryption() == Message.ENCRYPTION_PGP || message.getEncryption() == Message.ENCRYPTION_DECRYPTED) {
file.delete();
}
disconnectSocks5Connections();
}
Log.d(Config.LOGTAG, "successfully transmitted file:" + file.getAbsolutePath() + " (" + CryptoHelper.bytesToHex(file.getSha1Sum()) + ")");
if (message.getEncryption() != Message.ENCRYPTION_PGP) {