Closed Bug 1024744 Opened 10 years ago Closed 6 years ago

[email/backend] Consider manually resetting connections instead of waiting for normal timeouts/errors when we see network type changes

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: asuth, Unassigned)

References

Details

(Keywords: feature)

In https://bugzilla.mozilla.org/show_bug.cgi?id=1021341#c12 :nhirata reported a refresh taking a really long time, apparently because the network situation had changed but our connection was not promptly erroring out.

In some situations, it's likely there is nothing we can do without a system-level fix.  But in the case where we are transitioning from cellular data to wi-fi, we may be able to improve things.

Specifically, if our wi-fi gets spotty but Firefox OS is still hopeful about wi-fi and does not drop the connection, there's nothing useful the email app can do because we cannot choose which interface our connections originate from.  We'd just try and create a new connection and have that take a really long time.  When Firefox OS drops the wi-fi interface, linux should automatically kill our connection.

However, in the case where the user is going into a building where they have good wi-fi but spotty cellular reception, noticing that the connection type has been "upgraded" to wifi from cellular data would be beneficial from both a data-throughput status and a user-cost status (in the event cellular data is metered.)  The pathological case is where the phone thinks it has wi-fi but the still-open cellular data connection would still have been the better choice.

Since we want to be privileged, the API we'd want to use is the the network information API (https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API) (note that the standard has changed recently!  or at least our implementation) and hear when the connection type changes.

Note that if we did have a way to specify our origin interface we could try and be more proactive about killing abnormally laggy connections to retry them on a different interface.  (Of course, this becomes a moot issue if FxOS and the networks it's using support the mobile IP stuff I read about long long ago and I think Apple is distinctly unique in supporting?)
Depends on: 1192556
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.