Don't tear down server on disconnect

Summary: These safeguards were added based on a discussion in D35088208 (56e94394ca) but turned out to be counter-productive. Every time a client disconnects now, we're tearing down the socket and the server, allowing for no future connections.

Reviewed By: lblasa

Differential Revision: D36252605

fbshipit-source-id: c3b6f85dea4054505a47d24a72a4aac403371c0f
This commit is contained in:
Pascal Hartig
2022-05-10 08:45:57 -07:00
committed by Facebook GitHub Bot
parent 754afd0d2d
commit 14b83ad050

View File

@@ -161,15 +161,6 @@ async function startProxyServer(
res.end('Failed to proxy request: ' + err);
});
proxyServer.on('close', () => {
server.close();
});
server.on('close', () => {
proxyServer.close();
fs.remove(socketPath);
});
return new Promise((resolve) => {
proxyServer.listen(config.port);
server.listen(socketPath, undefined, () => resolve({app, server}));