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>(
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 ( ) ;
You can’t perform that action at this time.
0 commit comments