You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to how new connections receive the full state through .encodeAll(), and incoming patches through .encode() right after, it is a known issue that onAdd is going to be called twice when a client joins a room on this scenario:
Due to how new connections receive the full state through
.encodeAll()
, and incoming patches through.encode()
right after, it is a known issue thatonAdd
is going to be called twice when a client joins a room on this scenario:state.encodeAll()
. This includes theOPERATION.CLEAR
on the array.state.encode()
) is also going to include theOPERATION.CLEAR
- thus causing the array items to be included again.Related issue: colyseus/colyseus#249
Here's a test-case reproducing this problem:
schema/test/ArraySchemaTest.ts
Lines 1293 to 1311 in 448870a
The text was updated successfully, but these errors were encountered: