diff --git a/gns3server/modules/port_manager.py b/gns3server/modules/port_manager.py index f1af09f8..b0f882d8 100644 --- a/gns3server/modules/port_manager.py +++ b/gns3server/modules/port_manager.py @@ -252,19 +252,14 @@ class PortManager: project.record_udp_port(port) log.debug("UDP port {} has been reserved".format(port)) - def release_udp_port(self, port, project, force_remove=False): + def release_udp_port(self, port, project): """ Release a specific UDP port number :param port: UDP port number :param project: Project instance - :param force_remove: Force port removal even on Darwnin """ - # A bug with Dynamips on Darwin which doesn't correctly free UDP ports, they are freed only when changing the project - if sys.platform.startswith("darwin") and force_remove is False: - return - if port in self._used_udp_ports: self._used_udp_ports.remove(port) project.remove_udp_port(port) diff --git a/gns3server/modules/project.py b/gns3server/modules/project.py index fa71ab51..582ef2ae 100644 --- a/gns3server/modules/project.py +++ b/gns3server/modules/project.py @@ -365,7 +365,7 @@ class Project: for port in self._used_tcp_ports.copy(): port_manager.release_tcp_port(port, self) for port in self._used_udp_ports.copy(): - port_manager.release_udp_port(port, self, force_remove=True) + port_manager.release_udp_port(port, self) @asyncio.coroutine def commit(self):