File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -856,15 +856,12 @@ function wrapOnCallHandler<Req = any, Res = any>(
856
856
if ( ! acceptsStreaming ) {
857
857
return false ;
858
858
}
859
-
860
859
// if connection is already closed, response.write() is no-op.
861
860
if ( abortController . signal . aborted ) {
862
861
return false ;
863
862
}
864
-
865
863
const formattedData = encodeSSE ( { message : chunk } ) ;
866
864
const wrote = res . write ( formattedData ) ;
867
-
868
865
// Reset heartbeat timer after successful write
869
866
if ( wrote && heartbeatInterval !== null && heartbeatSeconds > 0 ) {
870
867
scheduleHeartbeat ( ) ;
@@ -887,14 +884,11 @@ function wrapOnCallHandler<Req = any, Res = any>(
887
884
result = await ( handler as any ) ( arg , responseProxy ) ;
888
885
clearScheduledHeartbeat ( ) ;
889
886
}
890
-
891
887
if ( ! abortController . signal . aborted ) {
892
888
// Encode the result as JSON to preserve types like Dates.
893
889
result = encode ( result ) ;
894
-
895
890
// If there was some result, encode it in the body.
896
891
const responseBody : HttpResponseBody = { result } ;
897
-
898
892
if ( acceptsStreaming ) {
899
893
res . write ( encodeSSE ( responseBody ) ) ;
900
894
res . end ( ) ;
You can’t perform that action at this time.
0 commit comments