Closed Bug 972265 Opened 10 years ago Closed 10 years ago

Use adaptive delays when trying to reconnect socket

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Details

Attachments

(3 files)

On my Hamachi, rild constantly disconnects; probably because of incompatibilities with Gecko's RIL code. Currently, Gecko tries to reconnect after 1 second, but this just fills the logcat with warnings.

A good delay for re-connects would adapt to the symptoms. So the more often the connect operation fails, the longer the delay gets. And for transient failures the delay should still remain short.

This should also handle a similar problem on systems where nfcd wasn't running. Gecko tried to connect to nfcd every second, and failed on each attempt.
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #1)
> Created attachment 8375441 [details] [diff] [review]
> [01] Bug 972265: Maintain connect delay in UnixSocketConsumer

The gecko socket get's disconnected because rilproxy closes it's end when rild disconnects. I'm also working on a similar patch to improve the situation in rilproxy.
Attachment #8375444 - Flags: review?(vyang) → review+
A follow-up for netd?  On Kitkat, netd initialization takes a few seconds longer especially in emulator. Current MAX_RECONNECT_TIMES=10 scheme gives only a 10 second window and sometimes netd just can't catch the last train.
Attachment #8375441 - Flags: review?(kyle) → review+
Attachment #8375445 - Flags: review?(allstars.chh) → review+
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #5)
> A follow-up for netd?  On Kitkat, netd initialization takes a few seconds
> longer especially in emulator. Current MAX_RECONNECT_TIMES=10 scheme gives
> only a 10 second window and sometimes netd just can't catch the last train.

This could certainly be used for netd, but should be a separate bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: