Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Fix for potential deadlock #85

Merged
merged 1 commit into from
Jul 5, 2018

Conversation

daletskyi
Copy link
Contributor

As discussed here creating separate PR for await fix.

@@ -243,7 +243,7 @@ internal BlockingRequestHandler(Client client, TimeSpan timeout)
// If status code is greater than 500 and less than 600, it indicates server error
// Error code 429 indicates rate limited.
// Retry uploading in these cases.
Task.Delay(backoff).Wait();
await Task.Delay(backoff);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a mimimum version of .net this must be used with? wondering if there's a chance of breaking compatibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum version for async/await is NET 4.5. However, this line is inside #else preprocessor block for all targets except NET 3.5 (Thread.Sleep(backoff) is used there). For portable assembly target is NET 4.5.1.

@f2prateek
Copy link
Contributor

Thanks!

@f2prateek f2prateek merged commit 790c6a0 into segmentio:master Jul 5, 2018
@daletskyi daletskyi deleted the potential-deadlock-fix branch July 8, 2018 18:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants