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
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user