Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip retry logic on Mono where it causes a crash #895

Merged
merged 1 commit into from
Aug 4, 2015
Merged
Changes from all commits
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
19 changes: 13 additions & 6 deletions modules/Octokit/Octokit.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ type Draft =
Project : string
DraftRelease : Release }

let rec private retry count asyncF =
async {
try
return! asyncF
with _ when count > 0 -> return! retry (count - 1) asyncF
}
let private isRunningOnMono = System.Type.GetType ("Mono.Runtime") <> null

let rec private retry count asyncF =
// This retry logic causes an exception on Mono:
// https://github.com/fsharp/fsharp/issues/440
if isRunningOnMono then
asyncF
else
async {
try
return! asyncF
with _ when count > 0 -> return! retry (count - 1) asyncF
}


let createClient user password =
Expand Down