parse-community / node-apn

Apple Push Notification module for Node.js
Other
177 stars 64 forks source link

Close clients on frameErrors? #64

Closed TysonAndre closed 3 years ago

TysonAndre commented 3 years ago

Some other clients disconnect for that reason, e.g. https://github.com/hisco/http2-client/blob/12a9e6fa6701a46e92e9b7adf395ce646b2a26b4/lib/request.js#L302-L318

session.on('frameError') listens for a frame error not associated with any stream. Because this shouldn't happen, it's probably a sign of a problem with the client or server that should result in a reconnection.

Currently, @parse/node-apn just debug logs it.

davimacedo commented 3 years ago

Yes. Maybe it makes sense to close the client and reconnect.