Skip to content

Commit e1a7764

Browse files
authored
Go back using xmlhttprequest for bidi-streams (#8197)
* Go back using xmlhttprequest for bidi-streams * Create pink-beds-study.md
1 parent 36b283f commit e1a7764

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/pink-beds-study.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/firestore": patch
3+
---
4+
5+
Go back using xmlhttprequest for bidi-streams, as fetch streams seem to be having connection issue.

packages/firestore/src/platform/browser/webchannel_connection.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import {
2727
EventTarget,
2828
StatEvent,
2929
Event,
30-
Stat
30+
Stat,
31+
FetchXmlHttpFactory
3132
} from '@firebase/webchannel-wrapper';
3233

3334
import { Token } from '../../api/credentials';
@@ -208,7 +209,7 @@ export class WebChannelConnection extends RestConnection {
208209
}
209210

210211
if (this.useFetchStreams) {
211-
request.useFetchStreams = true;
212+
request.xmlHttpFactory = new FetchXmlHttpFactory({});
212213
}
213214

214215
this.modifyHeadersForRequest(

0 commit comments

Comments
 (0)