Skip to content

Commit

Permalink
add backend patch for force closing http connections when stopping fa…
Browse files Browse the repository at this point in the history
…stify server
  • Loading branch information
achou11 committed Sep 23, 2024
1 parent 814e4d4 commit 582c7b1
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@comapeo/core/src/fastify-controller.js b/node_modules/@comapeo/core/src/fastify-controller.js
index a84c600..8517402 100644
--- a/node_modules/@comapeo/core/src/fastify-controller.js
+++ b/node_modules/@comapeo/core/src/fastify-controller.js
@@ -64,6 +64,8 @@ export class FastifyController {

async #stopServer() {
const { server } = this.#fastify
+ // Need to force close some connections (see https://github.com/digidem/comapeo-mobile/issues/611#issuecomment-2368795563)
+ server.closeIdleConnections()
await promisify(server.close.bind(server))()
}

0 comments on commit 582c7b1

Please sign in to comment.