mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
lint fix
This commit is contained in:
parent
26ebb316be
commit
ada3c6caf3
@ -110,10 +110,14 @@ export class ECLWebSocketClient {
|
||||
};
|
||||
this.heartbeat = (eclWsClt) => {
|
||||
this.logger.log({ selectedNode: eclWsClt.selectedNode, level: 'DEBUG', fileName: 'ECLWebSocket', msg: 'Websocket Server Heartbeat..' });
|
||||
if (!eclWsClt.webSocketClient)
|
||||
if (!eclWsClt.webSocketClient) {
|
||||
return;
|
||||
if (eclWsClt.webSocketClient.readyState !== 1)
|
||||
}
|
||||
;
|
||||
if (eclWsClt.webSocketClient.readyState !== 1) {
|
||||
return;
|
||||
}
|
||||
;
|
||||
eclWsClt.webSocketClient.ping();
|
||||
setTimeout(() => {
|
||||
this.heartbeat(eclWsClt);
|
||||
|
@ -97,7 +97,6 @@ export class ECLWebSocketClient {
|
||||
eclWsClt.reConnect = false;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
public disconnect = (selectedNode: CommonSelectedNode) => {
|
||||
@ -121,13 +120,14 @@ export class ECLWebSocketClient {
|
||||
|
||||
public heartbeat = (eclWsClt) => {
|
||||
this.logger.log({ selectedNode: eclWsClt.selectedNode, level: 'DEBUG', fileName: 'ECLWebSocket', msg: 'Websocket Server Heartbeat..' });
|
||||
if (!eclWsClt.webSocketClient) return;
|
||||
if (eclWsClt.webSocketClient.readyState !== 1) return;
|
||||
if (!eclWsClt.webSocketClient) { return };
|
||||
if (eclWsClt.webSocketClient.readyState !== 1) { return };
|
||||
eclWsClt.webSocketClient.ping();
|
||||
setTimeout(() => {
|
||||
this.heartbeat(eclWsClt);
|
||||
}, 59 * 1000);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export const ECLWSClient = new ECLWebSocketClient();
|
||||
|
@ -1,12 +1,12 @@
|
||||
export enum ECLWSEventsEnum {
|
||||
PAY_RECEIVED = 'payment-received',
|
||||
PAY_RELAYED = 'payment-relayed',
|
||||
PAY_SENT = 'payment-sent',
|
||||
PAY_SETTLING_ONCHAIN = 'payment-settling-onchain',
|
||||
PAY_FAILED = 'payment-failed',
|
||||
CHANNEL_OPENED = 'channel-opened',
|
||||
CHANNEL_STATE_CHANGED = 'channel-state-changed',
|
||||
CHANNEL_CLOSED = 'channel-closed',
|
||||
ONION_MESSAGE_RECEIVED = 'onion-message-received'
|
||||
}
|
||||
PAY_RECEIVED = 'payment-received',
|
||||
PAY_RELAYED = 'payment-relayed',
|
||||
PAY_SENT = 'payment-sent',
|
||||
PAY_SETTLING_ONCHAIN = 'payment-settling-onchain',
|
||||
PAY_FAILED = 'payment-failed',
|
||||
CHANNEL_OPENED = 'channel-opened',
|
||||
CHANNEL_STATE_CHANGED = 'channel-state-changed',
|
||||
CHANNEL_CLOSED = 'channel-closed',
|
||||
ONION_MESSAGE_RECEIVED = 'onion-message-received'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user