Skip to content

Commit

Permalink
tidy/fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Dec 27, 2023
1 parent 065149a commit 6f05b42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bsky/src/data-plane/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const createDataPlaneClient = (
baseUrls: string[],
opts: { httpVersion?: HttpVersion; rejectUnauthorized?: boolean },
) => {
assert(baseUrls.length > 0, 'no clients available')
const clients = baseUrls.map((baseUrl) => createBaseClient(baseUrl, opts))
assert(clients.length > 0, 'no clients available')
return makeAnyClient(Service, (method) => {
return async (...args) => {
let client = randomElement(clients)
Expand All @@ -31,7 +31,7 @@ export const createDataPlaneClient = (
const remainingClients = clients.filter((c) => c !== client)
client = randomElement(remainingClients)
if (client) {
return await client[method.localName](client)
return await client[method.localName](...args)
}
}
throw err
Expand All @@ -43,7 +43,7 @@ export const createDataPlaneClient = (
const createBaseClient = (
baseUrl: string,
opts: { httpVersion?: HttpVersion; rejectUnauthorized?: boolean },
) => {
): DataPlaneClient => {
const { httpVersion = '2', rejectUnauthorized = true } = opts
const transport = createConnectTransport({
baseUrl,
Expand Down

0 comments on commit 6f05b42

Please sign in to comment.