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
parent 48c06ff510
commit cb3a6f9548

View file

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