Giter Site home page Giter Site logo

Comments (24)

josevalim avatar josevalim commented on May 20, 2024 1

Perhaps we should change the built in generators as well.

from phoenix.

chrismccord avatar chrismccord commented on May 20, 2024 1

We still fallback when websocket drops and fails to connect within the failback threshold, but we now only memorize the fallback for the session if the websocket transport never successfully established a connection. This strikes a nice balance between saving the user from moving to a network that perm fails websockets (but their tab previously had a good websocket) and unnecessarily memorizing for the duration of the session.

from phoenix.

mainlymortal avatar mainlymortal commented on May 20, 2024

I have the exact same issue but assumed the default transport was mistakenly changed to longpoll instead of websocket.

A member on the elixir forum also has this issue by the looks of it as they can only connect via websocket by opening a new tab.

https://elixirforum.com/t/liveview-falls-back-to-longpoll-after-dev-server-restart/61736

from phoenix.

SteffenDE avatar SteffenDE commented on May 20, 2024

You could do something like this

longPollFallbackMs: location.host.startsWith("localhost") ? null : 2500,

to only configure longpoll when not in development.

from phoenix.

mainlymortal avatar mainlymortal commented on May 20, 2024

Would this issue still not happen in production though if a server a client is connected to happens to go down for any reason. The client will be stuck on long polling until they open a new browser tab / window.

from phoenix.

clarkware avatar clarkware commented on May 20, 2024

That works nicely. It also seems to have resolved a spurious Presence leave event I was getting which I'm guessing was related to memorizing the fallback.

Thanks for the quick fix!

from phoenix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.