Skip to content

Commit

Permalink
Update sync.js
Browse files Browse the repository at this point in the history
Updated the comment. As it was written, it felt as if this library performed the actual sending of the message contained in `encoder`. However, this library is network agnostic. 

Rather, it seems, it's up to the server using this lib whether it wants to send the message or not, and should not send it if it detects the message is empty (as seen [here](https://github.com/yjs/y-websocket/blob/625a9d52ba8bcff90a941d51ae151869e220f368/bin/utils.js#L171)).
  • Loading branch information
aryzing authored Aug 11, 2022
1 parent 4d2b5b2 commit 1f10c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const readUpdate = readSyncStep2

/**
* @param {decoding.Decoder} decoder A message received from another client
* @param {encoding.Encoder} encoder The reply message. Will not be sent if empty.
* @param {encoding.Encoder} encoder The reply message. Does not need to be sent if empty.
* @param {Y.Doc} doc
* @param {any} transactionOrigin
*/
Expand Down

0 comments on commit 1f10c96

Please sign in to comment.