mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 18:26:05 +08:00
feat(nbstore): use polling as ios websocket transport (#10001)
This commit is contained in:
@@ -14,7 +14,7 @@ declare module '../config' {
|
||||
}
|
||||
|
||||
defineStartupConfig('websocket', {
|
||||
transports: ['websocket', 'polling'],
|
||||
// see: https://socket.io/docs/v4/server-options/#maxhttpbuffersize
|
||||
transports: ['websocket'],
|
||||
maxHttpBufferSize: 1e8, // 100 MB
|
||||
});
|
||||
|
||||
@@ -158,7 +158,7 @@ class SocketManager {
|
||||
constructor(endpoint: string) {
|
||||
this.socketIOManager = new SocketIOManager(endpoint, {
|
||||
autoConnect: false,
|
||||
transports: ['websocket'],
|
||||
transports: [BUILD_CONFIG.isIOS ? 'polling' : 'websocket'],
|
||||
secure: new URL(endpoint).protocol === 'https:',
|
||||
// we will handle reconnection by ourselves
|
||||
reconnection: false,
|
||||
|
||||
Reference in New Issue
Block a user