From 95766e990a818aaaf0acc0ea9cace6d2602ac2f4 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Thu, 23 Feb 2017 11:56:31 -0800 Subject: [PATCH] [cloud-api] DONT Timeout streaming API connections every 15 minutes anymore This is a temporary commit to prevent connections from being closed while we release logic to re-establish delta connections after they are closed. Our infrastructure should be able to support current usage of delta connections after our fixes to offline notification and infrastructure This reverts commit 78f67d4a7681a1e652f57acdf0261f11b910515f. --- packages/isomorphic-core/src/delta-stream-builder.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/isomorphic-core/src/delta-stream-builder.js b/packages/isomorphic-core/src/delta-stream-builder.js index 027e3745d..d9cafc9e7 100644 --- a/packages/isomorphic-core/src/delta-stream-builder.js +++ b/packages/isomorphic-core/src/delta-stream-builder.js @@ -1,8 +1,6 @@ const _ = require('underscore'); const Rx = require('rx-lite') const stream = require('stream'); -const DELTA_CONNECTION_TIMEOUT_MS = 15 * 60000; -const OBSERVABLE_TIMEOUT_MS = DELTA_CONNECTION_TIMEOUT_MS - (1 * 60000); /** * A Transaction references objects that changed. This finds and inflates @@ -63,7 +61,6 @@ function transactionsSinceCursor(db, cursor, accountId) { } module.exports = { - DELTA_CONNECTION_TIMEOUT_MS: DELTA_CONNECTION_TIMEOUT_MS, buildAPIStream(request, {databasePromise, cursor, accountId, deltasSource}) { return databasePromise.then((db) => { const source = Rx.Observable.merge( @@ -72,7 +69,7 @@ module.exports = { deltasSource.flatMap((t) => stringifyTransactions(db, accountId, [t], "new")), Rx.Observable.interval(1000).map(() => "\n") - ).timeout(OBSERVABLE_TIMEOUT_MS); + ) const outputStream = stream.Readable(); outputStream._read = () => { return };