Skip to content

Commit

Permalink
Document apn.Provider.shutdown() in README
Browse files Browse the repository at this point in the history
Closes node-apn#542.
  • Loading branch information
eladnava authored and florianreinhart committed Mar 29, 2017
1 parent 2c122a3 commit 6749bde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ This will result in the the following notification payload being sent to the dev
{"messageFrom":"John Appelseed","aps":{"badge":3,"sound":"ping.aiff","alert":"\uD83D\uDCE7 \u2709 You have a new message"}}
```

You should only create one `Provider` per-process for each certificate/key pair you have. You do not need to create a new `Provider` for each notification. If you are only sending notifications to one app then there is no need for more than one `Provider`.
You should only create one `Provider` per-process for each certificate/key pair you have. You do not need to create a new `Provider` for each notification. If you are only sending notifications to one app then there is no need for more than one `Provider`.

If you are constantly creating `Provider` instances in your app, make sure to call `Provider.shutdown()` when you are done with each provider to release its resources and memory.

## Troubleshooting

Expand Down

0 comments on commit 6749bde

Please # to comment.