mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-10-31 12:16:29 +08:00 
			
		
		
		
	add handling for slice size reduction to for loop
This commit is contained in:
		 afeiszli
					afeiszli
				
			
				
					committed by
					
						 Matthew R. Kasun
						Matthew R. Kasun
					
				
			
			
				
	
			
			
			 Matthew R. Kasun
						Matthew R. Kasun
					
				
			
						parent
						
							b572a8cdaf
						
					
				
				
					commit
					d836718f04
				
			| @@ -47,11 +47,12 @@ func ManageZombies(ctx context.Context) { | ||||
| 			zombies = append(zombies, id) | ||||
| 		case id := <-removeZombie: | ||||
| 			found := false | ||||
| 			for i, zombie := range zombies { | ||||
| 				if zombie == id { | ||||
| 					logger.Log(1, "removing zombie from quaratine list", zombie) | ||||
| 			for i := 0; i < len(zombies); i++ { | ||||
| 				if zombies[i] == id { | ||||
| 					logger.Log(1, "removing zombie from quaratine list", zombies[i]) | ||||
| 					zombies = append(zombies[:i], zombies[i+1:]...) | ||||
| 					found = true | ||||
| 					i-- | ||||
| 				} | ||||
| 			} | ||||
| 			if !found { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user