Skip to content

Commit

Permalink
Merge pull request #625 from EYBlockchain/david/ws-logs
Browse files Browse the repository at this point in the history
remove ws ping logs
  • Loading branch information
Ilyas Ridhuan authored Apr 22, 2022
2 parents 5024a11 + 7eb4403 commit 84cd62a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions cli/lib/nf3.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,11 @@ class Nf3 {
this.intervalIDs.push(
setInterval(() => {
connection._ws.ping();
logger.debug('sent websocket ping');
// logger.debug('sent websocket ping');
}, WEBSOCKET_PING_TIME),
);
// and a listener for the pong
connection._ws.on('pong', () => logger.debug('websocket received pong'));
// connection._ws.on('pong', () => logger.debug('websocket received pong'));
logger.debug('websocket connection opened');
connection.send('instant');
};
Expand Down Expand Up @@ -837,11 +837,11 @@ class Nf3 {
this.intervalIDs.push(
setInterval(() => {
connection._ws.ping();
logger.debug('sent websocket ping');
// logger.debug('sent websocket ping');
}, WEBSOCKET_PING_TIME),
);
// and a listener for the pong
connection._ws.on('pong', () => logger.debug('websocket received pong'));
// connection._ws.on('pong', () => logger.debug('websocket received pong'));
logger.debug('websocket connection opened');
connection.send('blocks');
};
Expand Down Expand Up @@ -906,11 +906,11 @@ class Nf3 {
this.intervalIDs.push(
setInterval(() => {
connection._ws.ping();
logger.debug('sent websocket ping');
// logger.debug('sent websocket ping');
}, WEBSOCKET_PING_TIME),
);
// and a listener for the pong
connection._ws.on('pong', () => logger.debug('websocket received pong'));
// connection._ws.on('pong', () => logger.debug('websocket received pong'));
logger.debug('websocket connection opened');
connection.send('blocks');
};
Expand Down Expand Up @@ -962,11 +962,11 @@ class Nf3 {
this.intervalIDs.push(
setInterval(() => {
connection._ws.ping();
logger.debug('sent websocket ping');
// logger.debug('sent websocket ping');
}, WEBSOCKET_PING_TIME),
);
// and a listener for the pong
connection._ws.on('pong', () => logger.debug('websocket received pong'));
// connection._ws.on('pong', () => logger.debug('websocket received pong'));
logger.debug('websocket connection opened');
connection.send('challenge');
};
Expand Down Expand Up @@ -1012,11 +1012,11 @@ class Nf3 {
this.intervalIDs.push(
setInterval(() => {
connection._ws.ping();
logger.debug('sent websocket ping');
// logger.debug('sent websocket ping');
}, WEBSOCKET_PING_TIME),
);
// and a listener for the pong
connection._ws.on('pong', () => logger.debug('websocket received pong'));
// connection._ws.on('pong', () => logger.debug('websocket received pong'));
logger.debug('websocket connection opened');
connection.send('challenge');
};
Expand Down
2 changes: 1 addition & 1 deletion nightfall-optimist/src/event-handlers/subscribe.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function setupWebsocketEvents(ws, socketName) {
}, WEBSOCKET_PING_TIME);
// check we received a pong in time (clears the timer set by the pinger)
ws.on('pong', () => {
logger.debug(`Got pong from ${socketName} websocket`);
// logger.debug(`Got pong from ${socketName} websocket`);
clearTimeout(timeoutID);
});
ws.on('error', () => {
Expand Down

0 comments on commit 84cd62a

Please sign in to comment.