GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Fizz] Always call flush() if it exists (#21625) · react/react@cc4d24a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-server/src
    • ReactServerStreamConfigNode.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-server/src/ReactServerStreamConfigNode.js‎

Copy file name to clipboardExpand all lines: packages/react-server/src/ReactServerStreamConfigNode.js
+3-8Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import type {Writable} from 'stream';
1111

1212
type 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

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.