mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +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:
parent
2db740e1ad
commit
9e98f05be0
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user