remove port states for old ports

This commit is contained in:
soruh 2023-02-18 21:12:18 +01:00
parent 27826e4e0f
commit 9b20920400

View File

@ -236,6 +236,9 @@ impl PortHandler {
self.allocated_ports
.retain(|_, port| self.allowed_ports.is_allowed(*port)); // remove allocated ports that are no longer allowed
self.port_state
.retain(|port, _| self.allowed_ports.is_allowed(*port)); // remove port states that are no longer allowed
self.free_ports.retain(|port| {
let is_allocted = self
.allocated_ports