MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / release

Function release

packages/server/src/lock.ts:252–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

250 return {
251 lockPath,
252 release(): void {
253 if (released) return;
254 released = true;
255 if (!existsSync(lockPath)) return;
256 const contents = readLockContents(lockPath);
257 if (contents && contents.pid !== ownerPid) {
258 // Someone else owns the lock now — don't touch it.
259 return;
260 }
261 try {
262 unlinkSync(lockPath);
263 } catch {
264 // Best-effort: file may have vanished between existsSync and unlinkSync.
265 }
266 },
267 updatePort(port: number): void {
268 if (!existsSync(lockPath)) return;
269 const contents = readLockContents(lockPath);

Callers 7

buildContextFunction · 0.50
createKimiDeviceHeadersFunction · 0.50
deviceModelFunction · 0.50
acquireRefreshLockMethod · 0.50
doEnsureFreshMethod · 0.50
buildHeadersFunction · 0.50
deviceModelFunction · 0.50

Calls 1

readLockContentsFunction · 0.85

Tested by

no test coverage detected