fix(proxy): retry candidate ports on bind conflict

This commit is contained in:
Wooseong Kim committed 2026-04-20 14:59:59 +09:00
1 parent db32d15d86
commit 8ad2763942
3 files changed
+85 -69

No files matched your search

@@ -34,4 +34,12 @@ describe('listOpenAICompatProxyProfileNames', () => {
expect(listOpenAICompatProxyProfileNames()).toEqual(['ccg']);
});
it('skips malformed percent-encoded profile keys', () => {
fs.mkdirSync(path.dirname(getLegacyOpenAICompatProxySessionPath()), { recursive: true });
fs.writeFileSync(path.join(path.dirname(getLegacyOpenAICompatProxySessionPath()), '%E0%A4%.session.json'), '{}\n', 'utf8');
fs.writeFileSync(getOpenAICompatProxySessionPath('ccg'), '{}\n', 'utf8');
expect(listOpenAICompatProxyProfileNames()).toEqual(['ccg']);
});
});