From ca1c10ec72b27abc2b4ff6a3978ea207c161d6ec Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Sat, 12 Sep 2026 00:41:30 -0700 Subject: [PATCH] fix: give the realtime Redis event bridge the same wildcard TLS options as the command pool, because it is a second connection that a managed Redis rejects and it is the one that delivers every realtime event (#453) --- realtime/lib/realtime/redis/event_subscriber.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/realtime/lib/realtime/redis/event_subscriber.ex b/realtime/lib/realtime/redis/event_subscriber.ex index e46cb3a8..623ef29a 100644 --- a/realtime/lib/realtime/redis/event_subscriber.ex +++ b/realtime/lib/realtime/redis/event_subscriber.ex @@ -24,7 +24,10 @@ defmodule Realtime.Redis.EventSubscriber do def init(_opts) do redis_url = Application.get_env(:realtime, :redis_url, "redis://localhost:6379/0") - case Redix.PubSub.start_link(redis_url) do + # Same TLS options as the command pool: a managed Redis presents a wildcard + # certificate that Erlang's default hostname check rejects, and this + # connection is the one that delivers every realtime event. + case Redix.PubSub.start_link(redis_url, Realtime.Redis.tls_opts(redis_url)) do {:ok, conn} -> {:ok, _ref} = Redix.PubSub.subscribe(conn, @channel, self()) Logger.info("Realtime Redis event bridge subscribing to '#{@channel}'")