summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2026-01-10 11:37:26 -0500
committerRobby Zambito <contact@robbyzambito.me>2026-01-10 11:37:47 -0500
commit99ea7556581a678684e30202a8eee654a001588a (patch)
treecb2438d8ab2181012360fde24bffc606c8c6e2d0 /src
parent78b23ee59c6df29b043df565111f54afd963a61c (diff)
Send should be uncancelable
Diffstat (limited to 'src')
-rw-r--r--src/Server.zig4
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);
}
}
};