Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Jan 13, 2016
1 parent 410d971 commit 54d484b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions PushSharp.Apple/ApnsHttp2Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public async Task Send (ApnsHttp2Notification notification)

if (notification.Priority.HasValue)
headers.Add ("apns-priority", notification.Priority == ApnsPriority.Low ? "5" : "10"); // 5 or 10

headers.Add ("content-length", data.Length.ToString ());

if (!string.IsNullOrEmpty (notification.Topic))
Expand All @@ -97,8 +97,6 @@ public async Task Send (ApnsHttp2Notification notification)
var responseUuid = response.Headers ["apns-id"];
if (responseUuid != notification.Uuid)
throw new Exception ("Mismatched APNS-ID header values");

Console.WriteLine("OK");
} else {
// Try parsing json body
var json = new JObject ();
Expand Down
4 changes: 1 addition & 3 deletions PushSharp.Apple/ApnsHttp2Notification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ public class ApnsHttp2Notification : INotification

public string Topic { get;set; }

public const int MAX_PAYLOAD_SIZE = 4096; //will be 4096 soon
public const int MAX_PAYLOAD_SIZE = 4096;
public static readonly DateTime DoNotStore = DateTime.MinValue;
private static readonly DateTime UNIX_EPOCH = new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);

public ApnsHttp2Notification () : this (string.Empty, new JObject ())
{
Expand Down Expand Up @@ -88,4 +87,3 @@ public enum ApnsPriority
High = 10
}
}

0 comments on commit 54d484b

Please sign in to comment.