Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Increase timeout in PushServiceSocket #47

Open
petcap opened this issue Jan 22, 2018 · 1 comment
Open

Increase timeout in PushServiceSocket #47

petcap opened this issue Jan 22, 2018 · 1 comment

Comments

@petcap
Copy link

petcap commented Jan 22, 2018

I live in an area where cellular connection is quite bad. Data connections over LTE tend to "stall" (i.e. not being able to transmit or receive packets) for periods lasting between 20 to 60 seconds. This causes Signal to be unable to upload attachments such as images and files. Attachments start to upload, but after a while the connection times out and the process repeats until I get an error message saying that the upload failed.

Connections are however not broken by the network, i.e. the carriers NAT state is not reset when these stalls occur, so it should be enough to just increase the timeout setting (this line) in Signal in order to resolve this issue. I suggest setting this value to something between 120 to 300 seconds.

Please see this logcat trace: logcat.txt

I am using Signal on stock Android 8.1.0.

@five-c-d
Copy link

I have seen potentially-related issues when trying to upload a debuglog from stock Signal-Android 4.26.2 and I believe also once on an earlier version. The exact error message is here, I believe: "Network failure. Please try again." Invariably, changing from the '2G' dataplan over to wifi, permits me to upload the debuglog successfully.

These errors are caused not by LTE stalling methinks in my case, but by a throttling back to '2G' speeds (~~15KB/sec dataplan-via-cellular-network) after the monthly 4G-dataplan-allotment cap has been exceeded. Due to adjustments in the code since January, the correct line-number is now here though I cannot confirm for certain that this specific timeout is the one that I'm hitting when I see the 'network failure' attempting to upload a debuglog over a relatively-small datapipe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants