Skip to content

Commit

Permalink
fix error when compression is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
asokani committed May 12, 2020
1 parent 312a917 commit 2f8f08d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ class SSE extends EventEmitter {
res.write(`event: ${data.event}\n`);
}
res.write(`data: ${JSON.stringify(data.data)}\n\n`);
res.flush();
if (res.flush) {
res.flush();
}
};

const serializeListener = data => {
Expand Down

0 comments on commit 2f8f08d

Please sign in to comment.