Log lar temizlendi

This commit is contained in:
2025-10-29 11:59:04 +03:00
parent f6d9c64bcc
commit f5ac5a1c6c
2 changed files with 1 additions and 17 deletions

View File

@@ -2086,7 +2086,6 @@ function broadcastFileUpdate(rootFolder) {
function broadcastDiskSpace() {
if (!wss) return;
getSystemDiskInfo(DOWNLOAD_DIR).then(diskInfo => {
console.log("🔄 Broadcasting disk space:", diskInfo);
const data = JSON.stringify({
type: "diskSpace",
data: diskInfo
@@ -3522,15 +3521,10 @@ const server = app.listen(PORT, () =>
wss = new WebSocketServer({ server });
wss.on("connection", (ws) => {
console.log("🔌 New WebSocket connection established");
ws.send(JSON.stringify({ type: "progress", torrents: snapshot() }));
// Bağlantı kurulduğunda disk space bilgisi gönder
broadcastDiskSpace();
ws.on("close", () => {
console.log("🔌 WebSocket connection closed");
});
ws.on("error", (error) => {
console.error("🔌 WebSocket error:", error);
});