Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions JdSoft.Apple.Apns.Notifications/NotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,14 @@ void newCon_Connecting(object sender)

private bool queueSequential(Notification notification)
{
if (sequential > notificationConnections.Count - 1)
sequential = 0;

if (notificationConnections[sequential] != null)
return notificationConnections[sequential++].QueueNotification(notification);
var index = sequential;
if (index > notificationConnections.Count - 1)
sequential = index = 0;
else
sequential++;

if (notificationConnections[index] != null)
return notificationConnections[index].QueueNotification(notification);

return false;
}
Expand Down