diff --git a/src/context/socket.tsx b/src/context/socket.tsx index c930019d..93432014 100644 --- a/src/context/socket.tsx +++ b/src/context/socket.tsx @@ -24,6 +24,7 @@ export const SocketProvider = ({ children }: { children: JSX.Element }) => { const [id, setActiveId] = useState(socketStore.id); const setId = useCallback((id: string) => { + // the socket client connection is recomputed whenever id changes -> the new browser has been initialized const socket = io(`${SERVER_ENDPOINT}/${id}`, { transports: ["websocket"],