mirror of
https://github.com/warmbly/warmbly.git
synced 2026-09-12 16:04:25 +00:00
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)
This commit is contained in:
@@ -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}'")
|
||||
|
||||
Reference in New Issue
Block a user