         static_url(private.phoenix_endpoint, path)
       end
 
-      def static_url(%Socket{endpoint: endpoint} = conn, path) do
+      def static_url(%_{endpoint: endpoint} = conn, path) do
         static_url(endpoint, path)
       end
 

  @moduledoc false

  alias Phoenix.Router.Route
  alias Phoenix.Socket
  alias Plug.Conn

  @anno (if :erlang.system_info(:otp_release) >= '19' do

        private.phoenix_endpoint.static_path(path)
      end

      def static_path(%_{endpoint: endpoint} = conn, path) do
        endpoint.static_path(path)
      end

