File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ import { withWebSocket } from "./middleware/websocket";
18
18
import { withRoutes } from "./routes" ;
19
19
import { writeOpenApiToFile } from "./utils/openapi" ;
20
20
21
+ // The server timeout in milliseconds.
22
+ // Source: https://fastify.dev/docs/latest/Reference/Server/#connectiontimeout
23
+ const SERVER_CONNECTION_TIMEOUT = 60_000 ;
24
+
21
25
const __dirname = new URL ( "." , import . meta. url ) . pathname ;
22
26
23
27
interface HttpsObject {
@@ -47,6 +51,7 @@ export const initServer = async () => {
47
51
48
52
// Start the server with middleware.
49
53
const server : FastifyInstance = fastify ( {
54
+ connectionTimeout : SERVER_CONNECTION_TIMEOUT ,
50
55
disableRequestLogging : true ,
51
56
...( env . ENABLE_HTTPS ? httpsObject : { } ) ,
52
57
} ) . withTypeProvider < TypeBoxTypeProvider > ( ) ;
You can’t perform that action at this time.
0 commit comments