We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6b95dc0 + 675580a commit 0793ab0Copy full SHA for 0793ab0
PushSharp.Core/PushServiceBase.cs
@@ -289,7 +289,9 @@ private void CheckScale(object state = null)
289
Log.Info("{0} -> Destroying Channel", this);
290
ScaleChannels(ChannelScaleAction.Destroy);
291
}
292
- while (channels.Count < ServiceSettings.Channels && !this.cancelTokenSource.IsCancellationRequested)
+ while (channels.Count < ServiceSettings.Channels && !this.cancelTokenSource.IsCancellationRequested
293
+ && (DateTime.UtcNow - lastNotificationQueueTime) <= ServiceSettings.IdleTimeout
294
+ && Interlocked.Read(ref trackedNotificationCount) > 0)
295
{
296
Log.Info("{0} -> Creating Channel", this);
297
ScaleChannels(ChannelScaleAction.Create);
0 commit comments