Repository navigation
v0.6.2
Fixes for sessions that change while a client is connected. No breaking changes, and no new options; 0.6.x clients and servers talk to each other.
Fixes
$sync()no longer loops after a claim is removed on an idle database. The pull that removed the claim ended at the position it started from, and the client waited for a later position before trusting any answer, so it asked/partialand/revalidateagain forever. The token change now takes the position the pull ends at. The Swift client has the same fix.- An open socket follows the session the client's requests resolve. A socket keeps the credentials it opened with, for example the cookie from before a switch from an admin token to a plain one for the same user.
- The server closes a client's socket with code 4409 and routes nothing more to it when a read, pull or push from that client resolves another session. Reads now carry
clientId. - The client also reconnects its socket when an answer names other tokens than its stream gave it, at most once every 10 seconds. This covers a socket on another instance, and it fetches a new sync token first. The Swift client does the same.
- The server closes a client's socket with code 4409 and routes nothing more to it when a read, pull or push from that client resolves another session. Reads now carry
- A session revoked on the server (an allowlist change, a revoked session) while the client is idle is applied at the socket's next session check, every token lifetime (300 s by default). A demotion evicts the claim's rows; a
nullsession closes the socket with 4401.