INNER CODE UNIT · JavaScript

timer

bvisible/mcp-ssh-manager · src/index.js:1107

        const timer = setTimeout(() => {
          killed = true;
          rsyncProcess.kill('SIGTERM');
          reject(new Error(`Rsync timeout after ${timeout}ms`));
        }, timeout);

        // Collect output with size limit
        rsyncProcess.stdout.on('data', (data) => {
          const chunk = data.toString();
          output += chunk;
          // Limit output size to prevent memory issues
          if (output.length > 100000) {
            output = output.slice(-50000);
          }
        });

        rsyncProcess.stderr.on('data', (data) => {
          const chunk = data.toString();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…