Fix iframe loading when only the iframe server starts on random port (#2947)

This commit is contained in:
Jonatan Kłosko 2025-03-03 10:41:17 +01:00 committed by GitHub
parent c42c5d39fb
commit e4a63ef29a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,10 +27,9 @@ defmodule LivebookWeb.IframeEndpoint do
""" """
@spec port() :: pos_integer() @spec port() :: pos_integer()
def port() do def port() do
livebook_port = Livebook.Config.port()
iframe_port = Livebook.Config.iframe_port() iframe_port = Livebook.Config.iframe_port()
case livebook_port do case iframe_port do
0 -> 0 ->
try do try do
ThousandIsland.listener_info(__MODULE__) ThousandIsland.listener_info(__MODULE__)