Skip to content

Commit

Permalink
Fix default port
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed May 20, 2022
1 parent 6900f9c commit 176f8ea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apns2",
"version": "10.0.1",
"version": "10.0.2",
"description": "Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens.",
"author": "Andrew Barba <[email protected]>",
"main": "dist/index.js",
Expand Down
6 changes: 0 additions & 6 deletions src/apns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ const API_VERSION = 3
*/
const HOST = `api.push.apple.com`

/**
* @const
* @desc Default port to send request
*/
const PORT = 443

/**
* @const
* @desc Signing algorithm for JSON web token
Expand Down
2 changes: 1 addition & 1 deletion src/http2-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Http2Client {
private pingIntervalHandle: any | null

constructor(host: string, options: Http2ClientOptions = {}) {
this.url = `https://${host}:${options.port}`
this.url = `https://${host}:${options.port ?? 443}`
this.requestTimeout = options.requestTimeout ?? 5000
this.pingInterval = options.pingInterval ?? 60000
this.pingIntervalHandle = null
Expand Down

0 comments on commit 176f8ea

Please sign in to comment.