Skip to content

Commit 175b728

Browse files
committed
fix
1 parent 427e3b9 commit 175b728

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sim/socket/handlers/workflow.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ export function setupWorkflowHandlers(socket: AuthenticatedSocket, roomManager:
125125
)
126126
} catch (error) {
127127
logger.error('Error joining workflow:', error)
128-
// Undo socket.join if addUserToRoom or subsequent operations failed
128+
// Undo socket.join and room manager entry if any operation failed
129129
socket.leave(workflowId)
130+
await roomManager.removeUserFromRoom(socket.id)
130131
socket.emit('join-workflow-error', { error: 'Failed to join workflow' })
131132
}
132133
})

0 commit comments

Comments
 (0)