Skip to content

Commit

Permalink
fix: Improve the install fail success rate by adjusting retry policy
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jan 3, 2024
1 parent 9792dc2 commit 81e9a6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xmcl
3 changes: 2 additions & 1 deletion xmcl-runtime/network/pluginNetworkInterface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultRangePolicy, resolveAgent } from '@xmcl/file-transfer'
import { DefaultRangePolicy, createDefaultRetryHandler, resolveAgent } from '@xmcl/file-transfer'
import { ClassicLevel } from 'classic-level'
import { join } from 'path'
import { Agent, Dispatcher, Pool, setGlobalDispatcher } from 'undici'
Expand Down Expand Up @@ -129,6 +129,7 @@ export const pluginNetworkInterface: LauncherAppPlugin = (app) => {
],
proxy,
),
retryHandler: createDefaultRetryHandler(7),
checkpointHandler: {
lookup: async (url) => { return undefined },
put: async (url, checkpoint) => { },
Expand Down

0 comments on commit 81e9a6d

Please sign in to comment.