mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Ensure that allocated channels are reserved.
This was previously mostly working because the allocator itself was moving forward, but since each radio has its own allocator, aircraft with different radios would often get overlapping intra-flight frequencies.
This commit is contained in:
@@ -183,6 +183,7 @@ class RadioRegistry:
|
||||
try:
|
||||
while (channel := next(allocator)) in self.allocated_channels:
|
||||
pass
|
||||
self.reserve(channel)
|
||||
return channel
|
||||
except StopIteration:
|
||||
raise OutOfChannelsError(radio)
|
||||
|
||||
Reference in New Issue
Block a user