Skip to content

Commit

Permalink
Add res.flush at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1ller0 committed Mar 30, 2020
1 parent 30009ce commit 96723a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class SSE extends EventEmitter {
res.write(`event: ${data.event}\n`);
}
res.write(`data: ${JSON.stringify(data.data)}\n\n`);
res.flush();
};

const serializeListener = data => {
Expand Down

1 comment on commit 96723a0

@bradisbell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has broken compatibility with current LTS versions of Node.js, v14 and up. See also: #28

Please sign in to comment.