Skip to content

Commit 77057c4

Browse files
committed
removed setTimeouts
1 parent 3f07f39 commit 77057c4

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

redisinsight/api/src/modules/database-discovery/utils/autodiscovery.util.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,15 @@ export const getRunningProcesses = async (): Promise<string[]> =>
2929
let stdoutData = '';
3030
const proc = spawn(...getSpawnArgs());
3131

32-
// Add timeout to ensure we don't wait forever
33-
const timeout = setTimeout(() => {
34-
proc.kill();
35-
resolve([]); // Return empty array on timeout
36-
}, 1000);
37-
3832
proc.stdout.on('data', (data) => {
3933
stdoutData += data.toString();
4034
});
4135

4236
proc.on('error', (e) => {
43-
clearTimeout(timeout);
4437
reject(e);
4538
});
4639

4740
proc.stdout.on('end', () => {
48-
clearTimeout(timeout);
4941
resolve(stdoutData.split('\n'));
5042
});
5143
} catch (e) {

0 commit comments

Comments
 (0)