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

Support infinite timeouts #30

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Support infinite timeouts #30

merged 1 commit into from
Jun 3, 2020

Conversation

shaan1337
Copy link
Member

@shaan1337 shaan1337 commented Jun 2, 2020

Partially Fixes: #29

This PR allows infinite operation timeouts by specifying TimeSpan.MaxValue or Timeout.InfiniteTimeSpan in EventStoreClientOperationOptions.TimeoutAfter.

The second part of the issue (default timeout) has not been dealt with yet. The issue is that just changing the default timeout from 5 seconds to infinity would affect the default timeouts of all operations, not only stream read operations: https://github.com/EventStore/EventStore-Client-Dotnet/blob/master/src/EventStore.Client/EventStoreClientOperationOptions.cs#L10

We could override them in these specific stream read operations but i'm not sure if there's a better approach.

Copy link
Contributor

@pgermishuys pgermishuys left a comment

Choose a reason for hiding this comment

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

Hey @shaan1337, good work!
For the 2nd part,

  • We could potentially split the TimeoutAfter on the EventStoreClientOperationOptions into 2 namely ReadTimeoutAfter and AppendTimeoutAfter and default the read to TimeSpan.MaxValue and AppendTimeoutAfter to 5 seconds?

@pgermishuys pgermishuys merged commit b08826a into master Jun 3, 2020
@pgermishuys pgermishuys deleted the infinite-timeouts branch June 3, 2020 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow infinite operation timeouts + review default timeout of operations returning streams
3 participants