Remove debug logs from WebSocket ping/pong handlers

Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
2025-09-26 12:47:45 +09:00
parent 40fd0a667a
commit 403db1c141

View File

@@ -28,7 +28,6 @@ function startHeartbeat() {
pingIntervalId = setInterval(() => { pingIntervalId = setInterval(() => {
if (websocket && websocket.readyState === WebSocket.OPEN) { if (websocket && websocket.readyState === WebSocket.OPEN) {
websocket.send('ping'); websocket.send('ping');
console.log('WebSocket: Ping sent.');
// Set a timeout to check if a pong is received within HEARTBEAT_TIMEOUT // Set a timeout to check if a pong is received within HEARTBEAT_TIMEOUT
pongTimeoutId = setTimeout(() => { pongTimeoutId = setTimeout(() => {
@@ -94,7 +93,6 @@ export function initWebSocket({onOpen, onClose, onMessage, onError}) {
websocket.onmessage = (event) => { websocket.onmessage = (event) => {
if (event.data === 'pong') { if (event.data === 'pong') {
console.log('WebSocket: Pong received.');
// Clear the timeout as pong was received, resetting for the next ping // Clear the timeout as pong was received, resetting for the next ping
clearTimeout(pongTimeoutId); clearTimeout(pongTimeoutId);
pongTimeoutId = null; pongTimeoutId = null;