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';
11
11
12
12
type MightBeFlushable = {
13
13
flush ?: ( ) => void ,
14
- // Legacy
15
- flushHeaders ?: ( ) => void ,
16
14
...
17
15
} ;
18
16
@@ -31,12 +29,9 @@ export function flushBuffered(destination: Destination) {
31
29
// If we don't have any more data to send right now.
32
30
// Flush whatever is in the buffer to the wire.
33
31
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 ( ) ;
40
35
}
41
36
}
42
37
You can’t perform that action at this time.
0 commit comments