void notifyListenersNetworkUneachable ( ) { // NOTE: synchronized(listener) causes deadlock with listeners and Replicator.lock. final Set < NetworkReachabilityListener > copy = new HashSet <> ( listeners ) ; for ( NetworkReachabilityListener listener : copy ) { if ( listener != null ) { listener . networkUnreachable ( ) ; } } }
Notify listeners that the network is now unreachable