Comments (24)
Perhaps we should change the built in generators as well.
from phoenix.
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.
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.
You could do something like this
longPollFallbackMs: location.host.startsWith("localhost") ? null : 2500,
to only configure longpoll when not in development.
from phoenix.
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.
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)
- Generate long polling support on new apps
- Running MIX_ENV=docs mix docs results in compilation errors HOT 3
- Deleting umbrella :context_app config -> all generator files end up in *_web HOT 1
- Use mix format? HOT 1
- Creating Umbrella Web App With `phx.new.web` Results in App That Cannot Be Compiled HOT 6
- Miskeeping a `end` keyword in the context module while expanding it with `mix phx.gen.context` HOT 1
- :debug_heex_annotations mess up live_components HOT 2
- Response cookies must be set using cowboy_req HOT 2
- Bandit HTTP1.Handler error log for not handling :now_available when falling back to longpoll HOT 3
- Should it be allowed to generate live/html/json/... without attributes? HOT 2
- Context generator does not respect `--repo` option
- the umbrella generator is messy
- LiveView falls back to Longpolling too often HOT 15
- Does not seem possible to use assign in custom error html HOT 2
- `row_click` on CoreComponents `<.table>` component HOT 1
- Deprecation warning on startup HOT 1
- phx.gen.cert cannot generate a certificate on 2024-02-29 with a valid end date HOT 1
- Incorrect parameter name for category IDs in "Contexts" guide section HOT 2
- multiple phx.digest in mix alias doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoenix.