File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
packages/react-server/src Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ import type {Writable} from 'stream';
1111
1212type MightBeFlushable = {
1313 flush ?: ( ) => void ,
14- // Legacy
15- flushHeaders ?: ( ) => void ,
1614 ...
1715} ;
1816
@@ -31,12 +29,9 @@ export function flushBuffered(destination: Destination) {
3129 // If we don't have any more data to send right now.
3230 // Flush whatever is in the buffer to the wire.
3331 if ( typeof destination . flush === 'function' ) {
34- // http.createServer response have flush(), but it has a different meaning and
35- // is deprecated in favor of flushHeaders(). Detect to avoid a warning.
36- if ( typeof destination . flushHeaders !== 'function' ) {
37- // By convention the Zlib streams provide a flush function for this purpose.
38- destination . flush ( ) ;
39- }
32+ // By convention the Zlib streams provide a flush function for this purpose.
33+ // For Express, compression middleware adds this method.
34+ destination . flush ( ) ;
4035 }
4136}
4237
You can’t perform that action at this time.
0 commit comments