2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

Handle SocketTimeoutException when sending a payload

This means that the whole packet queue was 10 seconds blocked (!) which
I think we shouldn't let happen, but for now I've added this error message.
This commit is contained in:
Albert Vaca Cintora 2023-05-24 17:19:48 +02:00
parent 58a304a81e
commit a6eea8e996

View File

@ -205,6 +205,8 @@ public class LanLink extends BaseLink {
// If we could distinguish different cases we could react differently for some of them, but I haven't found how.
Log.e("sendPacket","Payload SSLSocket failed");
e.printStackTrace();
} catch(SocketTimeoutException e) {
Log.e("LanLink", "Socket for payload in packet " + np.getType() + " timed out. The other end didn't fetch the payload.");
} finally {
try { server.close(); } catch (Exception ignored) { }
try { payloadSocket.close(); } catch (Exception ignored) { }