diff --git a/apps/sim/stores/operation-queue/store.ts b/apps/sim/stores/operation-queue/store.ts index 7aa9166985..f6a96c118f 100644 --- a/apps/sim/stores/operation-queue/store.ts +++ b/apps/sim/stores/operation-queue/store.ts @@ -156,6 +156,17 @@ export const useOperationQueueStore = create((set, get) => emitFunction(operation) retryTimeouts.delete(operationId) + + // Create new operation timeout for this retry attempt + const newTimeoutId = setTimeout(() => { + logger.warn('Retry operation timeout - no server response after 5 seconds', { + operationId, + }) + operationTimeouts.delete(operationId) + get().handleOperationTimeout(operationId) + }, 5000) + + operationTimeouts.set(operationId, newTimeoutId) }, delay) retryTimeouts.set(operationId, timeout) @@ -201,8 +212,6 @@ export const useOperationQueueStore = create((set, get) => }, handleSocketReconnection: () => { - logger.info('Socket reconnected - clearing timeouts but keeping operations for retry') - // Clear all timeouts since they're for the old socket retryTimeouts.forEach((timeout) => clearTimeout(timeout)) retryTimeouts.clear()