diff --git a/package.json b/package.json index 0704bc8..eb4ebc0 100644 --- a/package.json +++ b/package.json @@ -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 ", "main": "dist/index.js", diff --git a/src/apns.ts b/src/apns.ts index f31556d..62ed30b 100644 --- a/src/apns.ts +++ b/src/apns.ts @@ -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 diff --git a/src/http2-client.ts b/src/http2-client.ts index 1f454f6..e084b99 100644 --- a/src/http2-client.ts +++ b/src/http2-client.ts @@ -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