Skip to content

Commit 23f85ac

Browse files
authored
Adjust cursors default outboundBatchInterval (#337)
1 parent 9b74209 commit 23f85ac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Cursors.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe('Cursors', () => {
116116
vi.spyOn(channel.presence, 'get').mockImplementation(createPresenceCount(2));
117117
await cursors['onPresenceUpdate']();
118118
expect(batching.shouldSend).toBeTruthy();
119-
expect(batching.batchTime).toEqual(25);
119+
expect(batching.batchTime).toEqual(50);
120120
});
121121

122122
it<CursorsTestContext>('batchTime is updated when multiple people are present', async ({
@@ -126,7 +126,7 @@ describe('Cursors', () => {
126126
}) => {
127127
vi.spyOn(channel.presence, 'get').mockImplementation(createPresenceCount(2));
128128
await cursors['onPresenceUpdate']();
129-
expect(batching.batchTime).toEqual(25);
129+
expect(batching.batchTime).toEqual(50);
130130
});
131131

132132
describe('pushCursorPosition', () => {

src/Space.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SPACE_CHANNEL_TAG = '::$space';
2020
const SPACE_OPTIONS_DEFAULTS = {
2121
offlineTimeout: 120_000,
2222
cursors: {
23-
outboundBatchInterval: 25,
23+
outboundBatchInterval: 50,
2424
paginationLimit: 5,
2525
},
2626
};

0 commit comments

Comments
 (0)