diff options
| author | Robby Zambito <contact@robbyzambito.me> | 2026-01-10 11:37:26 -0500 |
|---|---|---|
| committer | Robby Zambito <contact@robbyzambito.me> | 2026-01-10 11:37:47 -0500 |
| commit | 99ea7556581a678684e30202a8eee654a001588a (patch) | |
| tree | cb2438d8ab2181012360fde24bffc606c8c6e2d0 /src/Server.zig | |
| parent | 78b23ee59c6df29b043df565111f54afd963a61c (diff) | |
Send should be uncancelable
Diffstat (limited to 'src/Server.zig')
| -rw-r--r-- | src/Server.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Server.zig b/src/Server.zig index 65129a5..e20f5c0 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -43,7 +43,9 @@ const Subscription = struct { try self.queue_lock.lock(io); defer self.queue_lock.unlock(io); for (bytes) |chunk| { - try self.queue.putAll(io, chunk); + // Uncancelable because canceling the sender in the middle of this loop + // would put an invalid set series of bytes in the receivers queue. + _ = try self.queue.putUncancelable(io, chunk, chunk.len); } } }; |
