fix(sync): Ignore Broken Pipe on SSE emitter in warm pool and optimize SyncRunner
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled

This commit is contained in:
jade
2026-08-14 16:27:09 +09:00
parent d8a8501c4e
commit 1d69bd914e
17 changed files with 78 additions and 641 deletions

View File

@@ -223,9 +223,19 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor
// this.emitter.complete(); // MCP 표준 클라이언트 지원을 위해 스트림 강제 종료 제거
}
} catch (Exception e) {
log.error("Error sending message to SSE emitter", e);
if (e.getClass().getSimpleName().contains("AsyncRequestNotUsableException") ||
(e.getCause() != null && e.getCause() instanceof java.io.IOException)) {
log.debug("SSE emitter is disconnected (expected in Warm Pool): {}", e.getMessage());
} else {
log.error("Error sending message to SSE emitter", e);
}
if (this.emitter != null) {
this.emitter.completeWithError(e);
try {
this.emitter.completeWithError(e);
} catch (Exception ignored) {
// ignore already completed
}
}
}
});