Remove debug logs from WebSocket ping/pong handlers
Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
|
||||
import * as dom from './dom.js';
|
||||
import * as api from './api.js';
|
||||
import {getAuthHeaders, handleResponse} from './api.js'; // Import auth functions
|
||||
import * as ui from './ui.js';
|
||||
import {clearTerminal, downloadTerminalOutput, fitTerminal} from './terminal.js';
|
||||
import {debounce, isMobile} from './utils.js';
|
||||
import {getAuthHeaders, handleResponse} from './api.js'; // Import auth functions
|
||||
|
||||
// A flag to track if charts have been initialized
|
||||
let chartsInitialized = false;
|
||||
@@ -60,7 +60,6 @@ export function setupEventListeners() {
|
||||
console.log("Event listeners already attached. Skipping.");
|
||||
return;
|
||||
}
|
||||
console.log("Attaching event listeners...");
|
||||
|
||||
// --- Terminal Controls ---
|
||||
dom.clearButton.addEventListener('click', clearTerminal);
|
||||
@@ -189,5 +188,4 @@ export function setupEventListeners() {
|
||||
window.addEventListener('resize', debounce(ui.handleResize, 150));
|
||||
|
||||
listenersAttached = true;
|
||||
console.log("Event listeners attached successfully.");
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ function startHeartbeat() {
|
||||
pingIntervalId = setInterval(() => {
|
||||
if (websocket && websocket.readyState === WebSocket.OPEN) {
|
||||
websocket.send('ping');
|
||||
console.log('WebSocket: Ping sent.');
|
||||
|
||||
// Set a timeout to check if a pong is received within HEARTBEAT_TIMEOUT
|
||||
pongTimeoutId = setTimeout(() => {
|
||||
@@ -94,7 +93,6 @@ export function initWebSocket({onOpen, onClose, onMessage, onError}) {
|
||||
|
||||
websocket.onmessage = (event) => {
|
||||
if (event.data === 'pong') {
|
||||
console.log('WebSocket: Pong received.');
|
||||
// Clear the timeout as pong was received, resetting for the next ping
|
||||
clearTimeout(pongTimeoutId);
|
||||
pongTimeoutId = null;
|
||||
|
||||
Reference in New Issue
Block a user