Skip to content

Catch exceptions in sendPacket

Albert Vaca Cintora requested to merge work/catch-sendpayload-exceptions into master

Exceptions in LanLink's sendPacket would blow up the DevicePacketQueue sending thread. This was mostly okay because we did disconnect before the link before, but would prevent printing the error log that shows which packages did drop.

There's one particular kind of exception that was happening here that caught my attention: SocketTimeoutException happening when sending a payload. This could easily happen if we send a payload but the other end doesn't read it (eg: it's a notification icon they already have cached) but it would cause the whole packet queue to be blocked for 10 seconds. I'll try to fix this case on a separate MR, but I've added a log for now.

Merge request reports