Skip to content

Commit e36a2c1

Browse files
committed
fix: added requestTimeout per <parse-community/node-apn#43>
1 parent c9ce658 commit e36a2c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

helpers/send-apn.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const crypto = require('node:crypto');
77

88
const apn = require('@parse/node-apn');
99
const dayjs = require('dayjs-with-plugins');
10+
const ms = require('ms');
1011
const pMap = require('p-map');
1112
const pMapSeries = require('p-map-series');
1213

@@ -39,6 +40,7 @@ async function sendApn(client, id, mailboxPath = 'INBOX') {
3940
// <https://github.com/freswa/dovecot-xaps-daemon/blob/abce2f14cf1b5afa56329ebb4d923c9c2aebdfe3/internal/apns.go#L26>
4041
// ca: GEO_TRUST_CA,
4142
// rejectUnauthorized: false, // only needed if GEO_TRUST_CA passed
43+
requestTimeout: ms('15s'),
4244
production: true // always required
4345
});
4446

0 commit comments

Comments
 (0)