We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
stop
1 parent af4d68f commit 0ef2a9fCopy full SHA for 0ef2a9f
src/adapter/types.ts
@@ -26,10 +26,18 @@ export interface ElysiaAdapter {
26
*
27
* @example
28
* ```typescript
29
- * app.stop(true) // Abruptly any requests inflight
+ * app.stop({ closeActiveConnections: true }) // Abruptly stop any requests inflight
30
+ * ```
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * app.stop({ shutdownTimeout: 1000 }) // Wait for 1 second to stop the server
35
* ```
36
*/
- stop?(app: AnyElysia, closeActiveConnections?: boolean): Promise<void>
37
+ stop?(
38
+ app: AnyElysia,
39
+ params: { closeActiveConnections?: boolean; shutdownTimeout?: number }
40
+ ): Promise<void>
41
isWebStandard?: boolean
42
handler: {
43
/**
0 commit comments