Coder Social home page Coder Social logo

Comments (6)

tommoor avatar tommoor commented on June 5, 2024

This message seems to be guarded by resyncInterval being enabled so I'm just disabling that option for now – it seems like the interval just needs to be cleared on socket close?

from y-websocket.

dmonad avatar dmonad commented on June 5, 2024

I was working with someone who reported (and showed logs) that the first sync message went missing. This would mean that in some browsers the first message on the websocket protocol can get lost which is very disturbing.

The issue seems to happen when a client connects through a VPN to a different region. It was only happening to a non-developer and I wanted to confirm what is happening.

I haven't head back from that user. So I will remove the message.

resyncInterval should fix the issue anyway. I'm not sure what else I can do.

from y-websocket.

tommoor avatar tommoor commented on June 5, 2024

Any truth in my observation that rsyncinterval should be cleared when the connection is closed?

from y-websocket.

dmonad avatar dmonad commented on June 5, 2024

When the connection is closed then then ws object should be set to null (

websocket.onclose = () => {
).

Then resyncInterval shouldn't do anything anymore.. (

if (this.ws) {
)

So how do you have a closed connection and still have the resyncInterval send messages?

Do you overwrite the onclose property? Or is there an edge case I'm not aware of?

from y-websocket.

tommoor avatar tommoor commented on June 5, 2024

Not overwriting anything. It was happening during the retry connection loop once the server is killed, so there might be an edge-case – If I pin it down I'll file another ticket/PR.

from y-websocket.

dmonad avatar dmonad commented on June 5, 2024

That would be great, thanks!

from y-websocket.

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.