MCPcopy
hub / github.com/di-sukharev/opencommit / setupTimeout2

Function setupTimeout2

out/cli.cjs:53134–53155  ·  view source on GitHub ↗
(onConnectTimeout2, timeout)

Source from the content-addressed store, hash-verified

53132 const cb = callback;
53133 callback = null;
53134 cb(err);
53135 }
53136 });
53137 return socket;
53138 };
53139 }
53140 function setupTimeout2(onConnectTimeout2, timeout) {
53141 if (!timeout) {
53142 return () => {
53143 };
53144 }
53145 let s1 = null;
53146 let s2 = null;
53147 const timeoutId = setTimeout(() => {
53148 s1 = setImmediate(() => {
53149 if (process.platform === "win32") {
53150 s2 = setImmediate(() => onConnectTimeout2());
53151 } else {
53152 onConnectTimeout2();
53153 }
53154 });
53155 }, timeout);
53156 return () => {
53157 clearTimeout(timeoutId);
53158 clearImmediate(s1);

Callers 1

buildConnectorFunction · 0.85

Calls 2

setTimeoutFunction · 0.85
clearTimeoutFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…