mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:29:32 -05:00 
			
		
		
		
	fix(web): always use websocket transport (#6564)
This commit is contained in:
		
							parent
							
								
									a8efbc6772
								
							
						
					
					
						commit
						bd2dbb4944
					
				@ -16,7 +16,11 @@ import {
 | 
				
			|||||||
} from '@nestjs/websockets';
 | 
					} from '@nestjs/websockets';
 | 
				
			||||||
import { Server, Socket } from 'socket.io';
 | 
					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
 | 
					export class CommunicationRepository
 | 
				
			||||||
  implements OnGatewayConnection, OnGatewayDisconnect, OnGatewayInit, ICommunicationRepository
 | 
					  implements OnGatewayConnection, OnGatewayDisconnect, OnGatewayInit, ICommunicationRepository
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -37,6 +37,7 @@ export const openWebsocketConnection = async () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    websocket = io('', {
 | 
					    websocket = io('', {
 | 
				
			||||||
      path: '/api/socket.io',
 | 
					      path: '/api/socket.io',
 | 
				
			||||||
 | 
					      transports: ['websocket'],
 | 
				
			||||||
      reconnection: true,
 | 
					      reconnection: true,
 | 
				
			||||||
      forceNew: true,
 | 
					      forceNew: true,
 | 
				
			||||||
      autoConnect: true,
 | 
					      autoConnect: true,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user