Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Timeout is specified in TimeSpan, but doesn't tolerate all input in domain #2

Open
haf opened this issue Dec 14, 2011 · 0 comments
Open

Comments

@haf
Copy link

haf commented Dec 14, 2011

public static bool SendRequestWaitForResponse<TRequest>(this UntypedChannel channel, TimeSpan timeout) 
in class ExtensionsForChannels

If I pass TimeSpan.MaxValue to this method, I get the exception:

System.ArgumentOutOfRangeException was unhandled by user code
  Message=Number must be either non-negative and less than or equal to Int32.MaxValue or -1.
Parameter name: timeout
  Source=mscorlib
  ParamName=timeout
  StackTrace:
       at System.Threading.WaitHandle.WaitOne(TimeSpan timeout, Boolean exitContext)
       at Stact.ExtensionsForChannels.SendRequestWaitForResponse[TRequest](UntypedChannel channel, TimeSpan timeout) in d:\BuildAgent-02\work\115708377bf4f2b8\src\Stact\Channels\ExtensionsForChannels.cs:line 92
       at ReceiverSpike.contexts.finicky_consumer_context.with_filter(Action`1 action) in D:\code\throw-away\ReceiverSpike\ReceiverSpike\contexts\finicky_consumer_context.cs:line 59
       at ReceiverSpike.when_inserting_multiple_events_they_are_filtered_spec.<.ctor>b__0() in D:\code\throw-away\ReceiverSpike\ReceiverSpike\filter_specifications.cs:line 62
       at Machine.Specifications.Utility.RandomExtensionMethods.<InvokeAll>b__3(Action x)
       at Machine.Specifications.Utility.RandomExtensionMethods.Each[T](IEnumerable`1 enumerable, Action`1 action)
       at Machine.Specifications.Utility.RandomExtensionMethods.InvokeAll(IEnumerable`1 actions)
       at Machine.Specifications.Utility.RandomExtensionMethods.InvokeAll(IEnumerable`1 becauseActions)
       at Machine.Specifications.Model.Context.EstablishContext()
  InnerException: 

And yet I am passing a value that is completely valid according to the API...

How can I be sure to wait indefinitely for an actor without doing something like this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant