Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 7a84b5c

Browse files
committed
chore: close connection
1 parent 0c6ca35 commit 7a84b5c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

apps/worker/src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export const mongodb = new MongoClient(process.env.MONGO_URL!, {
5959
client: redis
6060
}),
6161
dSources = dataSources(),
62-
app = fastify();
62+
app = fastify({
63+
connectionTimeout: 10_000,
64+
keepAliveTimeout: 10_000
65+
});
6366

6467
export let v3Server: ApolloServer<FastifyContext>,
6568
v4Server: ApolloServer<FastifyContext>;
@@ -142,10 +145,9 @@ async function run() {
142145
const diff = process.hrtime(req.responseTimeCalc);
143146
reply.headers({
144147
"X-Response-Time": diff[0] * 1e3 + diff[1] / 1e6,
145-
"X-Powered-By": "PreMiD",
146-
Connection: "close"
148+
"X-Powered-By": "PreMiD"
147149
});
148-
return;
150+
return reply;
149151
});
150152

151153
app.register(v3Server.createHandler({ path: "/v3" }));

0 commit comments

Comments
 (0)