querylog: the writer queue defaults to 1024 entries, and a live stream allocates its ring on subscribe instead of at boot
This commit is contained in:
@@ -72,8 +72,10 @@ pub fn stream(
|
||||
}
|
||||
defer if (state.limiter) |limiter| limiter.releaseSse(io, client);
|
||||
|
||||
const id = hub.subscribe(io) orelse
|
||||
return http_util.respondError(request, .service_unavailable, "live stream is full");
|
||||
const id = hub.subscribe(io) catch |err| return switch (err) {
|
||||
error.Full => http_util.respondError(request, .service_unavailable, "live stream is full"),
|
||||
error.OutOfMemory => http_util.respondError(request, .service_unavailable, "no memory for a live stream"),
|
||||
};
|
||||
defer hub.unsubscribe(io, id);
|
||||
|
||||
var response = try request.http.respondStreaming(&.{}, .{
|
||||
|
||||
Reference in New Issue
Block a user