Skip to content

Offline and reconnect

PeerConnection reconnects after an unexpected close with exponential backoff, jitter, and a capped delay. It buffers outbound messages up to the configured messageBufferSize and flushes them after net:reconnected. Intentional disconnect() clears the connection and does not reconnect.

While disconnected, an application can continue mutating its local Chronicle when its game design permits it. On reconnection, Automerge sync messages exchange missing changes and merge replicas. Watershed demonstrates this relay-assisted offline flow: local placements can merge after reconnect.

Offline operation is not a server queue, durable identity, or conflict policy for arbitrary application messages. Size the message buffer deliberately and persist local state separately when work must survive a process or page loss.