mirror of
https://github.com/mempool/mempool.git
synced 2025-10-10 02:02:45 +02:00
Set backend to out of sync after connection retry interval has exceeded.
This commit is contained in:
@@ -21,6 +21,7 @@ import donations from './api/donations';
|
||||
import logger from './logger';
|
||||
import backendInfo from './api/backend-info';
|
||||
import loadingIndicators from './api/loading-indicators';
|
||||
import mempool from './api/mempool';
|
||||
|
||||
class Server {
|
||||
private wss: WebSocket.Server | undefined;
|
||||
@@ -120,6 +121,7 @@ class Server {
|
||||
const loggerMsg = `runMainLoop error: ${(e.message || e)}. Retrying in ${this.currentBackendRetryInterval} sec.`;
|
||||
if (this.currentBackendRetryInterval > 5) {
|
||||
logger.warn(loggerMsg);
|
||||
mempool.setOutOfSync();
|
||||
} else {
|
||||
logger.debug(loggerMsg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user