• Hugo Benichi's avatar
    arc: net: fix bug when the last connected network disconnects · 4b66e0b1
    Hugo Benichi authored
    Change-Id If3e511212f491a5ec6533c8fb259c49eab29295b introduced a
    regression when the last connected network is disconnected: depending of
    the exact order of internal callback events in ArcNetHostImpl, it can
    happen that ARC never learns about the disconnection event.
    
    This patch ensures that when the list of active networks becomes empty,
    ARC receives an event about it.
    
    BUG=b:162904019
    BUG=b:159667565
    TEST=Compiled, flashed rammus, tested disconnecting wifi with no
    ethernet connected and confirmed that ARC disconnects the network inside
    Android.
    
    Change-Id: Ifcb984f5942d0d132e277a8699fb1f3b43e5b72d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336245
    Commit-Queue: Hugo Benichi <hugobenichi@google.com>
    Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#795822}
    4b66e0b1
arc_net_host_impl.cc 35 KB