Skip to content

Commit

Permalink
fix: ui download retry
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuwaki committed Jan 7, 2025
1 parent e9063c2 commit 0dee009
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions experimental/clashapi/server_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ func (s *Server) checkAndDownloadExternalUI() {
os.MkdirAll(s.externalUI, 0o755)
}
if len(entries) == 0 {
err = s.downloadExternalUI()
if err != nil {
for attempts := 0; attempts < 3; attempts++ {
err = s.downloadExternalUI()
if err == nil {
break
}
s.logger.Error("download external ui error: ", err)
}
}
Expand Down

0 comments on commit 0dee009

Please sign in to comment.