fix(endpoint): destroy after shutdown to clear heartbeat interval by martijndeh · Pull Request #554 · node-apn/node-apn · GitHub
Skip to content

fix(endpoint): destroy after shutdown to clear heartbeat interval#554

Open
martijndeh wants to merge 1 commit into
node-apn:mainfrom
martijndeh:master
Open

fix(endpoint): destroy after shutdown to clear heartbeat interval#554
martijndeh wants to merge 1 commit into
node-apn:mainfrom
martijndeh:master

Conversation

@martijndeh

Copy link
Copy Markdown

The heartbeat interval keeps the event loop alive. Originally, I just did an .unref() on the interval to fix the issue, but the warnings in the docs made me implement the fix in another way.

So now, after a shutdown, the endpoints get flagged as pending destroy. If the internal sockets closes and pending destroy is set, it finally calls the destroy clearing all heartbeat intervals.

Fixes #543.

@coveralls

coveralls commented Apr 7, 2017

Copy link
Copy Markdown

@florianreinhart

Copy link
Copy Markdown
Member

@martijndeh Could you please make sure that the test coverage stays at 100%? Thanks!

@mtaweel

mtaweel commented Jan 22, 2019

Copy link
Copy Markdown

mtaweel added a commit to mtaweel/node-pushnotifications that referenced this pull request Jan 22, 2019
Switch node-apn to `martijndeh/node-apn` which solves this issue -> node-apn/node-apn#554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provider does not shutdown after a successful send

4 participants