Skip to content

Commit cacfb79

Browse files
authored
[#4873] Support for SSE interface RPC calls (#4875)
1 parent a9fdc22 commit cacfb79

File tree

50 files changed

+1820
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1820
-66
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up jdk
3737
uses: actions/setup-java@v3
3838
with:
39-
java-version: '21'
39+
java-version: '17'
4040
distribution: 'temurin'
4141
- name: Set up Maven
4242
uses: stCarolas/[email protected]

common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ protected void onExecuteHttpServerFiltersFinish(Response response, Throwable e)
351351

352352
if (!(response.getResult() instanceof ServerWebSocket)) {
353353
try {
354-
responseEx.flushBuffer();
354+
responseEx.endResponse();
355355
} catch (Throwable flushException) {
356356
LOGGER.error("Failed to flush rest response, operation:{}, request uri:{}",
357357
getMicroserviceQualifiedName(), requestEx.getRequestURI(), flushException);

common/common-rest/src/main/java/org/apache/servicecomb/common/rest/RestProducerInvocationFlow.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,24 @@ protected Invocation sendCreateInvocationException(Throwable throwable) {
5353
requestEx.getRequestURI(), e);
5454
}
5555

56-
flushResponse("UNKNOWN_OPERATION");
56+
endResponse("UNKNOWN_OPERATION");
5757
return null;
5858
}
5959

6060
@Override
6161
protected void sendResponse(Invocation invocation, Response response) {
6262
if (isDownloadFileResponseType(invocation, response)) {
6363
responseEx.sendPart(PartUtils.getSinglePart(null, response.getResult()))
64-
.whenComplete((r, e) -> flushResponse(invocation.getMicroserviceQualifiedName()));
64+
.whenComplete((r, e) -> endResponse(invocation.getMicroserviceQualifiedName()));
6565
return;
6666
}
6767

68-
flushResponse(invocation.getMicroserviceQualifiedName());
68+
endResponse(invocation.getMicroserviceQualifiedName());
6969
}
7070

71-
private void flushResponse(String operationName) {
71+
private void endResponse(String operationName) {
7272
try {
73-
responseEx.flushBuffer();
73+
responseEx.endResponse();
7474
} catch (Throwable flushException) {
7575
LOGGER.error("Failed to flush rest response, operation:{}, request uri:{}",
7676
operationName, requestEx.getRequestURI(), flushException);

0 commit comments

Comments
 (0)