fix: bridge ERR log level + n_ctx auto-retry with compressed prompt
This commit is contained in:
+3
-2
@@ -73,15 +73,16 @@ export class BridgeServer {
|
||||
// once() 사용: 중복 에러 이벤트 방지
|
||||
server.once('error', (err: any) => {
|
||||
if (err.code === 'EADDRINUSE') {
|
||||
// INFO 레벨: ERR 콘솔 오염 방지 (Extension Host가 console.error를 ERR로 표시)
|
||||
logInfo(`Bridge Port ${port} already in use. Trying port ${port + 1}...`);
|
||||
// 기존 서버 참조 정리 후 다음 포트 시도
|
||||
server.close();
|
||||
if (this.server === server) {
|
||||
this.server = null;
|
||||
}
|
||||
this.start(port + 1);
|
||||
} else {
|
||||
logError(`Bridge server error on port ${port}:`, err);
|
||||
// EADDRINUSE 외 진짜 에러만 logError
|
||||
logInfo(`Bridge server non-fatal error on port ${port}: ${err.code || err.message}`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user