Skip to content

Commit

Permalink
Listen for error event when connection an http2 session
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed Jun 21, 2018
1 parent 185ad97 commit 90230fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Change Log

---

## [4.0.3](https://github.com/AndrewBarba/apns2/releases/tag/4.0.3)

1. Listen for `error` event when connecting an http2 session

## [4.0.2](https://github.com/AndrewBarba/apns2/releases/tag/4.0.2)

1. Reset signing token every 59 minutes to prevent `TooManyProviderTokenUpdates` error
Expand Down
1 change: 1 addition & 0 deletions lib/http2-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class HTTP2Client {
connect() {
return new Promise((resolve, reject) => {
let session = http2.connect(this._url)
session.once('error', reject)
session.once('socketError', reject)
session.once('connect', () => {
this._connected(session)
Expand Down
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": "4.0.2",
"version": "4.0.3",
"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": "lib/apns.js",
Expand Down

0 comments on commit 90230fd

Please sign in to comment.