fix(bench): Fastify keep-alive parity via constructor; drop dead raw-http route

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-07-06 22:49:22 -05:00
1 parent 92ca5f96da
commit 768d8d0fd5
2 files changed
+1 -3

No files matched your search

+1 -2
View File
@@ -1,6 +1,6 @@
import Fastify from 'fastify';
const app = Fastify({ logger: false });
const app = Fastify({ logger: false, keepAliveTimeout: 5000 });
app.get('/hello', async () => ({ hello: 'world' }));
app.get('/users/:id', async (req: any) => ({ id: req.params.id }));
const hook = (n: number) => (req: any, _res: any, done: any) => { req[`s${n}`] = n; done(); };
@@ -14,6 +14,5 @@ app.post('/validate', {
});
app.listen({ port: 0 }, (err, addr) => {
if (err) { console.error(err); process.exit(1); }
(app.server as any).keepAliveTimeout = 5000;
console.log(`READY ${Number(new URL(addr).port)}`);
});