🔒️(yprovider) readOnly connections awareness propagation - #2544
Conversation
d13c89a to
487411f
Compare
|
Looks good! I will add an option to ignore awareness messages in yhub as well. The one thing to look out for is whether the connection resets regularly. y-websocket-server, for example, will disconnect the user if it did not receive an update from that user. |
We noticed that a read-only connection was still able to propagate awareness updates (cursor/selection presence) to other clients, even though connectionConfig.readOnly already blocked document sync updates. Override MessageReceiver.apply to no-op for any read-only connection instead of delegating to the original implementation, so document awareness updates never propagate from it. The connection itself is left open; only the awareness is dropped.
487411f to
a035fea
Compare
@dmonad - Thank you for the review - Yes you were right, the ping pong to keep the connection alive was based on awareness , at least in Hocuspocus v3.4.4, I think they change this mechanism in their last version (>v4). I did a fixup commit - when we get a awareness message from Wdyt ? |
|
Please investigate if that fixes the issue. y-websocket doesn't disconnect, it is the server that disconnects after a timeout. Returning the awareness message to the client might not help. |
Purpose
We noticed that a read-only connection was still able to propagate awareness updates (cursor/selection presence) to other clients, even though
connectionConfig.readOnlyalready blocked document sync updates.Override
MessageReceiver.applyto no-op for any read-only connection instead of delegating to the original implementation, so neither document updates nor awareness updates ever propagate from it.The connection itself is left open; only the message is dropped.