Log lar temizlendi
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user