mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +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', {
|
defineStartupConfig('websocket', {
|
||||||
|
transports: ['websocket', 'polling'],
|
||||||
// see: https://socket.io/docs/v4/server-options/#maxhttpbuffersize
|
// see: https://socket.io/docs/v4/server-options/#maxhttpbuffersize
|
||||||
transports: ['websocket'],
|
|
||||||
maxHttpBufferSize: 1e8, // 100 MB
|
maxHttpBufferSize: 1e8, // 100 MB
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class SocketManager {
|
|||||||
constructor(endpoint: string) {
|
constructor(endpoint: string) {
|
||||||
this.socketIOManager = new SocketIOManager(endpoint, {
|
this.socketIOManager = new SocketIOManager(endpoint, {
|
||||||
autoConnect: false,
|
autoConnect: false,
|
||||||
transports: ['websocket'],
|
transports: [BUILD_CONFIG.isIOS ? 'polling' : 'websocket'],
|
||||||
secure: new URL(endpoint).protocol === 'https:',
|
secure: new URL(endpoint).protocol === 'https:',
|
||||||
// we will handle reconnection by ourselves
|
// we will handle reconnection by ourselves
|
||||||
reconnection: false,
|
reconnection: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user