Skip to content

Commit a6c203c

Browse files
committed
Misc. formatting
1 parent 0c3585f commit a6c203c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/common/providers/https.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -856,15 +856,12 @@ function wrapOnCallHandler<Req = any, Res = any>(
856856
if (!acceptsStreaming) {
857857
return false;
858858
}
859-
860859
// if connection is already closed, response.write() is no-op.
861860
if (abortController.signal.aborted) {
862861
return false;
863862
}
864-
865863
const formattedData = encodeSSE({ message: chunk });
866864
const wrote = res.write(formattedData);
867-
868865
// Reset heartbeat timer after successful write
869866
if (wrote && heartbeatInterval !== null && heartbeatSeconds > 0) {
870867
scheduleHeartbeat();
@@ -887,14 +884,11 @@ function wrapOnCallHandler<Req = any, Res = any>(
887884
result = await (handler as any)(arg, responseProxy);
888885
clearScheduledHeartbeat();
889886
}
890-
891887
if (!abortController.signal.aborted) {
892888
// Encode the result as JSON to preserve types like Dates.
893889
result = encode(result);
894-
895890
// If there was some result, encode it in the body.
896891
const responseBody: HttpResponseBody = { result };
897-
898892
if (acceptsStreaming) {
899893
res.write(encodeSSE(responseBody));
900894
res.end();

0 commit comments

Comments
 (0)