When receiving large files (even worse when uploading multiple files) the receiving socket
often times-out.
Details
- Reviewers
albertvaka - Group Reviewers
KDE Connect - Commits
- R225:96b0a9ea9b08: A SO_TIMEOUT of 1 second often leads to the socket timing out when transferring…
Send 1 or 2 big files from desktop to android without this patch and you should see 1 or both transfers
fail because of a SO_TIMEOUT
Apply this patch and re-run the test and both transfers should now complete without an SO_TIMEOUT
Diff Detail
- Repository
- R225 KDE Connect - Android application
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Without this patch I almost always get a SO_TIMEOUT when transferring large files:
11-16 09:23:43.003 4913-5849/org.kde.kdeconnect_tp I/SharePlugin: hasPayload
11-16 09:23:59.653 4913-5861/org.kde.kdeconnect_tp E/SharePlugin: Receiver thread exception
11-16 09:23:59.653 4913-5861/org.kde.kdeconnect_tp W/System.err: java.net.SocketTimeoutException: Read timed out
11-16 09:23:59.663 4913-5861/org.kde.kdeconnect_tp W/System.err: at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
11-16 09:23:59.663 4913-5861/org.kde.kdeconnect_tp W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:811)
11-16 09:23:59.663 4913-5861/org.kde.kdeconnect_tp W/System.err: at java.io.InputStream.read(InputStream.java:162)
11-16 09:23:59.663 4913-5861/org.kde.kdeconnect_tp W/System.err: at org.kde.kdeconnect.Plugins.SharePlugin.SharePlugin.lambda$receiveFile$0(SharePlugin.java:223)
11-16 09:23:59.663 4913-5861/org.kde.kdeconnect_tp W/System.err: at org.kde.kdeconnect.Plugins.SharePlugin.-$$Lambda$SharePlugin$ZYKEDwKPyhgSKEpWVtNwHWTn5AU.run(lambda)
11-16 09:23:59.663 4913-5861/org.kde.kdeconnect_tp W/System.err: at java.lang.Thread.run(Thread.java:818)
+1, This seems to be the motivation because my transfers fail if the connection is not 100% perfect.
Let's merge this as it seems to fix problems for you guys. I'm not a network expert, but 1 second seemed like plenty of time for a LAN, though :/