Commit 7fcef1a
committed
fix: re-verify connectivity when cached state is false before blocking call
OEMs like Xiaomi signal ConnectivityResult.none to backgrounded apps even
when the network interface stays active, setting the cached _netConnected to
false. When the app returns to foreground the stream may not re-emit, leaving
the cache stale. Trusting a cached true is safe (fast path); trusting a cached
false is not — always re-check so a genuine connectivity event can clear it.1 parent 32e9b77 commit 7fcef1a
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | | - | |
44 | | - | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments