File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,12 @@ const AsyncQueue = struct {
287287
288288 fn _check (self : * AsyncQueue , repeat_delay : * ? u63 ) ! void {
289289 const client = self .client ;
290+ if (client .freeSlotCount () == 1 ) {
291+ // always leave 1 free connection for sync requests
292+ repeat_delay .* = 10 * std .time .ns_per_ms ;
293+ return ;
294+ }
295+
290296 const state = client .state_pool .acquireOrNull () orelse {
291297 // re-run this function in 10 milliseconds
292298 repeat_delay .* = 10 * std .time .ns_per_ms ;
@@ -3802,7 +3808,7 @@ const TestContext = struct {
38023808 errdefer loop .deinit ();
38033809
38043810 var o = opts ;
3805- o .max_concurrent = 1 ;
3811+ o .max_concurrent = 2 ;
38063812
38073813 const client = try Client .init (testing .allocator , loop , o );
38083814 errdefer client .deinit ();
You can’t perform that action at this time.
0 commit comments