Use uniform Socket message size to avoid disconnects
Summary: During startup the socket connection would close a few times, among others because Scribe dumps 1.3 MB of data after startup, and the maximum payload of `socket.io` defaults to 1MB. This diff changes it to 100MB (the max size used by `ws` library). We know that we need at least > 10 MB, as that is what plugins like Network cap at. Reviewed By: aigoncharov Differential Revision: D33017653 fbshipit-source-id: 1233af6fbdc4b9eed42786ee418cfd6d43b2b433
This commit is contained in:
committed by
Facebook GitHub Bot
parent
accef856fc
commit
3ef1923b29
@@ -138,7 +138,10 @@ function launchServer() {
|
||||
}
|
||||
|
||||
async function restartServer() {
|
||||
proc?.kill(9);
|
||||
if (proc) {
|
||||
proc.kill(9);
|
||||
await sleep(1000);
|
||||
}
|
||||
try {
|
||||
await compileServerMain();
|
||||
await launchServer();
|
||||
@@ -196,10 +199,13 @@ async function startWatchChanges() {
|
||||
await restartServer();
|
||||
|
||||
if (argv.open) {
|
||||
setTimeout(() => {
|
||||
// TODO: make port configurable together with flipper-server
|
||||
open('http://localhost:52342/index.web.dev.html');
|
||||
}, 2000);
|
||||
await sleep(2000);
|
||||
// TODO: make port configurable together with flipper-server
|
||||
open('http://localhost:52342/index.web.dev.html');
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
function sleep(ms: number) {
|
||||
return new Promise((r) => setTimeout(r, ms));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user