Skip to content

Commit d551107

Browse files
fix(fcm): Increase FCM timeout to 15s (#1947)
1 parent 6ed9722 commit d551107

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/messaging/messaging-api-request-internal.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { SendResponse, BatchResponse } from './messaging-api';
2727

2828

2929
// FCM backend constants
30-
const FIREBASE_MESSAGING_TIMEOUT = 10000;
30+
const FIREBASE_MESSAGING_TIMEOUT = 15000;
3131
const FIREBASE_MESSAGING_BATCH_URL = 'https://fcm.googleapis.com/batch';
3232
const FIREBASE_MESSAGING_HTTP_METHOD: HttpMethod = 'POST';
3333
const FIREBASE_MESSAGING_HEADERS = {

test/unit/messaging/messaging.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3538,7 +3538,7 @@ describe('Messaging', () => {
35383538
expect(httpsRequestStub).to.have.been.calledOnce.and.calledWith({
35393539
method: 'POST',
35403540
data: { message: expectedReq },
3541-
timeout: 10000,
3541+
timeout: 15000,
35423542
url: 'https://fcm.googleapis.com/v1/projects/project_id/messages:send',
35433543
headers: expectedHeaders,
35443544
});

0 commit comments

Comments
 (0)