From 5425817daeb44d40f9958ec7a2370904bb02dfc3 Mon Sep 17 00:00:00 2001 From: kito1510 Date: Sun, 5 Jun 2022 23:39:56 +0900 Subject: [PATCH] =?UTF-8?q?'patches-api'=20=E3=81=AB=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patches-api/0001-reuse-port-by-default.patch | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 patches-api/0001-reuse-port-by-default.patch diff --git a/patches-api/0001-reuse-port-by-default.patch b/patches-api/0001-reuse-port-by-default.patch new file mode 100644 index 0000000..beeb091 --- /dev/null +++ b/patches-api/0001-reuse-port-by-default.patch @@ -0,0 +1,27 @@ +From 3ad7b342cb24b16f9885b18ee5321cd695ac7dcd Mon Sep 17 00:00:00 2001 +From: Emilien Devos +Date: Wed, 23 Feb 2022 23:48:17 +0100 +Subject: [PATCH 1/1] reuse port by default + +--- + src/invidious.cr | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/invidious.cr b/src/invidious.cr +index d4878759..5a2cdce0 100644 +--- a/src/invidious.cr ++++ b/src/invidious.cr +@@ -562,4 +562,8 @@ Kemal.config.app_name = "Invidious" + Kemal.config.env = "production" if !ENV.has_key?("KEMAL_ENV") + {% end %} + +-Kemal.run ++Kemal.run do |config| ++ server = config.server.not_nil! ++ server.bind_tcp Kemal.config.host_binding, Kemal.config.port, reuse_port: true ++ server.bind_tcp Kemal.config.host_binding, 0 ++end +\ No newline at end of file +-- +2.35.1 +