Files
firezone/rust
Thomas Eizinger 17dfdb63d4 feat(relay): handle failed allocations (#1831)
This patch series refactors how we handle allocations in the relay to
make it easier to forward a failure to the `Server`. Each allocation
runs in a separate task (to allow for parallelization). If the
allocation fails, this channel is automatically closed.

Previously, this would erroneously trigger a `debug_assert!`. Now, we
invoke a callback on `Server` to allow it to clean up its internal
resources for the allocation.

At the same time, we simplify the buffering around data that is destined
for a certain allocation. Instead of having an additional buffer in the
event-loop, we increase the channel size to 10. Any exceeding items will
be dropped to avoid memory growth. This means that the `Server` is never
blocked on a slow allocation.

Given that we are running on top of an unreliable protocol anyway, I'd
say this is fine.
2023-07-31 21:39:31 +00:00
..
2023-05-10 07:58:32 -07:00
2023-06-28 18:48:33 +00:00