fix: relax request timeouts
This commit is contained in:
parent
2fd97377f6
commit
1d2d710fce
3 changed files with 1 additions and 3 deletions
|
|
@ -31,7 +31,6 @@ export const { use: useGlobalSDK, provider: GlobalSDKProvider } = createSimpleCo
|
||||||
const platform = usePlatform()
|
const platform = usePlatform()
|
||||||
const sdk = createOpencodeClient({
|
const sdk = createOpencodeClient({
|
||||||
baseUrl: server.url,
|
baseUrl: server.url,
|
||||||
signal: AbortSignal.timeout(1000 * 60 * 10),
|
|
||||||
fetch: platform.fetch,
|
fetch: platform.fetch,
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ export const { use: useSDK, provider: SDKProvider } = createSimpleContext({
|
||||||
const globalSDK = useGlobalSDK()
|
const globalSDK = useGlobalSDK()
|
||||||
const sdk = createOpencodeClient({
|
const sdk = createOpencodeClient({
|
||||||
baseUrl: globalSDK.url,
|
baseUrl: globalSDK.url,
|
||||||
signal: AbortSignal.timeout(1000 * 60 * 10),
|
|
||||||
fetch: platform.fetch,
|
fetch: platform.fetch,
|
||||||
directory: props.directory,
|
directory: props.directory,
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
||||||
const sdk = createOpencodeClient({
|
const sdk = createOpencodeClient({
|
||||||
baseUrl: url,
|
baseUrl: url,
|
||||||
fetch: platform.fetch,
|
fetch: platform.fetch,
|
||||||
signal: AbortSignal.timeout(2000),
|
signal: AbortSignal.timeout(3000),
|
||||||
})
|
})
|
||||||
return sdk.global
|
return sdk.global
|
||||||
.health()
|
.health()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue