Fix importing large Flipper exports
Reviewed By: lblasa Differential Revision: D38945105 fbshipit-source-id: ba78ccfc82b65013b79c6c962de7bdef5ae41a60
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9b58f5217e
commit
5515b27499
@@ -75,7 +75,13 @@ async function getKeytarModule(staticPath: string): Promise<KeytarModule> {
|
|||||||
|
|
||||||
async function getExternalServer(path: string) {
|
async function getExternalServer(path: string) {
|
||||||
const options = {
|
const options = {
|
||||||
WebSocket: WS,
|
WebSocket: class WSWithUnixDomainSocketSupport extends WS {
|
||||||
|
constructor(url: string, protocols: string | string[]) {
|
||||||
|
// Flipper exports could be large, and we snd them over the wire
|
||||||
|
// Setting this limit fairly high (1GB) to allow any reasonable Flipper export to be loaded
|
||||||
|
super(url, protocols, {maxPayload: 1024 * 1024 * 1024});
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
const socket = new ReconnectingWebSocket(`ws+unix://${path}`, [], options);
|
const socket = new ReconnectingWebSocket(`ws+unix://${path}`, [], options);
|
||||||
const server = await createFlipperServerWithSocket(
|
const server = await createFlipperServerWithSocket(
|
||||||
|
|||||||
Reference in New Issue
Block a user