Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixed: YamlConfigProvider attempts to load invalid config infinitely
  • Loading branch information
vasily-kirichenko committed Sep 19, 2014
commit 533a3b4360074afb92bdd821205bbda763de4ae0
4 changes: 2 additions & 2 deletions src/FSharp.Configuration/TypeProviders.Helper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ module File =
| 0, x -> return x
| _, "" ->
printfn "Attempt %d of %d: %s is empty. Sleep for 1 sec, then retry..." attempt maxAttempts filePath
return! sleepAndRun (attempt - 1)
return! sleepAndRun attempt
| _, content -> return content
finally file.Dispose()
| None ->
printfn "Attempt %d of %d: cannot read %s. Sleep for 1 sec, then retry..." attempt maxAttempts filePath
return! sleepAndRun (attempt - 1) }
return! sleepAndRun attempt }
loop maxAttempts |> Async.RunSynchronously

type private State =
Expand Down