Skip to content

High performance self-hosted photo and video management solution.

fix(web): always use websocket transport (#6564)

Jason Rasmussenbd2dbb49440f
diff --git a/server/src/infra/repositories/communication.repository.ts b/server/src/infra/repositories/communication.repository.ts
index 160a595298..23edf85411 100644
--- a/server/src/infra/repositories/communication.repository.ts
+++ b/server/src/infra/repositories/communication.repository.ts
@@ -16,7 +16,11 @@ import {
} from '@nestjs/websockets';
import { Server, Socket } from 'socket.io';
-@WebSocketGateway({ cors: true, path: '/api/socket.io' })
+@WebSocketGateway({
+ cors: true,
+ path: '/api/socket.io',
+ transports: ['websocket'],
+})
export class CommunicationRepository
implements OnGatewayConnection, OnGatewayDisconnect, OnGatewayInit, ICommunicationRepository
{
diff --git a/web/src/lib/stores/websocket.ts b/web/src/lib/stores/websocket.ts
index fce8422ae3..cc8ebdad0c 100644
--- a/web/src/lib/stores/websocket.ts
+++ b/web/src/lib/stores/websocket.ts
@@ -37,6 +37,7 @@ export const openWebsocketConnection = async () => {
websocket = io('', {
path: '/api/socket.io',
+ transports: ['websocket'],
reconnection: true,
forceNew: true,
autoConnect: true,