Skip to content

Commit

Permalink
Ack timeout is too short under stress scenarios.
Browse files Browse the repository at this point in the history
- Bumped ack timeout to 30 seconds.
- Made ack handler public so it's easy to override the timeout.

#1435
  • Loading branch information
davidfowl committed Feb 10, 2013
1 parent 0f4c191 commit 34f518f
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -2,12 +2,13 @@

using System;
using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.AspNet.SignalR.Infrastructure
{
internal class AckHandler : IAckHandler, IDisposable
public class AckHandler : IAckHandler, IDisposable
{
private readonly ConcurrentDictionary<string, AckInfo> _acks = new ConcurrentDictionary<string, AckInfo>();

Expand All @@ -18,12 +19,13 @@ internal class AckHandler : IAckHandler, IDisposable
private Timer _timer;

public AckHandler()
: this(completeAcksOnTimeout: true,
ackThreshold: TimeSpan.FromSeconds(5),
: this(completeAcksOnTimeout: true,
ackThreshold: TimeSpan.FromSeconds(30),
ackInterval: TimeSpan.FromSeconds(5))
{
}

[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Acks", Justification = "Ack is a well known term")]
public AckHandler(bool completeAcksOnTimeout, TimeSpan ackThreshold, TimeSpan ackInterval)
{
if (completeAcksOnTimeout)
Expand Down

0 comments on commit 34f518f

Please sign in to comment.