You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
networking: Fix requests failing when turning network off and on facebook#19709.
This bug is probably actually a bug in OkHttp: square/okhttp#4079
Both issues linked above contain extensive details about the issue, its likely origins and
how to reproduce it. A short summary of the issue and the fix in this commit:
On Android, disconnecting from the network somehow corrupts the idle connections and ongoing
calls in okhttp clients. New requests made over these clients fail. This commit works around
that bug by evicting the idle connection pool and cancelling all ongoing calls of each client
when we receive a DISCONNECTED or CONNECTING event (we don't know yet if only one or both of
them cause the issue).
Cancelling all calls is aggressive, but when a device disconnects any ongoing calls can fail
anyway, so an app has to expect this scenario.
0 commit comments