mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 16:02:43 +01:00 
			
		
		
		
	fix(network): better disconnect handler
This commit is contained in:
		| @@ -605,14 +605,15 @@ int waybar::modules::Network::handleEvents(struct nl_msg *msg, void *data) { | ||||
|     char ifname[IF_NAMESIZE]; | ||||
|     if_indextoname(ifi->ifi_index, ifname); | ||||
|     // Check for valid interface | ||||
|     if (net->checkInterface(ifi, ifname)) { | ||||
|     if ((net->ifid_ == -1 || ifi->ifi_index != net->ifid_) && net->checkInterface(ifi, ifname)) { | ||||
|       net->ifname_ = ifname; | ||||
|       net->ifid_ = ifi->ifi_index; | ||||
|       // Get Iface and WIFI info | ||||
|       net->getInterfaceAddress(); | ||||
|       net->thread_timer_.wake_up(); | ||||
|       return NL_OK; | ||||
|     } else if (ifi->ifi_index == net->ifid_ && !(ifi->ifi_flags & IFF_RUNNING)) { | ||||
|     } else if (ifi->ifi_index == net->ifid_ && (!(ifi->ifi_flags & IFF_RUNNING) || | ||||
|                !(ifi->ifi_flags & IFF_UP) || !net->checkInterface(ifi, ifname))) { | ||||
|       net->clearIface(); | ||||
|       // Check for a new interface and get info | ||||
|       net->checkNewInterface(ifi); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex
					Alex