Use pop() instead of pop(0) for O(1) port removal

This commit is contained in:
YueGuobin 2026-06-16 22:56:42 +08:00
parent 59e5f8dd2f
commit 390a40ce80
No known key found for this signature in database

View File

@ -838,7 +838,7 @@ class Project:
"""
ports = self._preallocated_udp_ports.get(compute_id, [])
if ports:
return ports.pop(0)
return ports.pop()
return None
@open_required