Commit 2 of 5:
6acb55728a
fix(ios): report busy async media and auth pools
previous
next
whole branch
Review threads live on the whole diff, not on one commit, so
none are shown here - a thread's line means something in the
branch's final form, and painting it into an intermediate
step would put it on code it is not about.
packages/zig/src/bridge_mobile_audiorec.zig modified +1 -1 Changes to packages/zig/src/bridge_mobile_audiorec.zig ⋯ 147 lines Show the 147 lines above this hunk @@ -148,7 +148,7 @@ pub const AudioRecordingBridge = struct { 148 148 "startAudioRecording: no free reply slot; {d} native calls are already awaiting one", 149 149 .{ios_async.max_in_flight}, 150 150 ); 151 - return BridgeError. NativeCallFailed ; 151 + return BridgeError. Busy ; 152 152 }; 153 153 errdefer ios_async.abandon(ticket); 154 154 pending = ticket;
packages/zig/src/bridge_mobile_auth.zig modified +1 -1 Changes to packages/zig/src/bridge_mobile_auth.zig ⋯ 141 lines Show the 141 lines above this hunk @@ -142,7 +142,7 @@ pub const AuthBridge = struct { 142 142 "authenticate: no free reply slot; {d} native calls are already awaiting one", 143 143 .{ios_async.max_in_flight}, 144 144 ); 145 - return BridgeError. NativeCallFailed ; 145 + return BridgeError. Busy ; 146 146 }; 147 147 errdefer ios_async.abandon(ticket); 148 148
packages/zig/src/bridge_mobile_auth_apple.zig modified +1 -1 Changes to packages/zig/src/bridge_mobile_auth_apple.zig ⋯ 148 lines Show the 148 lines above this hunk @@ -149,7 +149,7 @@ pub const AppleAuthBridge = struct { 149 149 150 150 fn poolFull() BridgeError { 151 151 std.log.warn("signInWithApple refused: all {d} async slots in flight", .{ios_async.max_in_flight}); 152 - return BridgeError. InvalidParameter ; 152 + return BridgeError. Busy ; 153 153 } 154 154 155 155 /// `@[ASAuthorizationScopeFullName, ASAuthorizationScopeEmail]`, or null when
packages/zig/src/bridge_mobile_bluetooth.zig modified +1 -1 Changes to packages/zig/src/bridge_mobile_bluetooth.zig ⋯ 195 lines Show the 195 lines above this hunk @@ -196,7 +196,7 @@ pub const BluetoothBridge = struct { 196 196 "startBluetoothScan: no free reply slot; {d} native calls are already awaiting one", 197 197 .{ios_async.max_in_flight}, 198 198 ); 199 - return BridgeError. NativeCallFailed ; 199 + return BridgeError. Busy ; 200 200 }; 201 201 errdefer ios_async.abandon(ticket); 202 202 pending = ticket;