express-sse
express-sse copied to clipboard
Remove res.flush
Removes res.flush(), causes error on express 4.17 (TypeError: res.flush is not a function) and occurs on res.write anyway.
A decent workaround is to just add a res.flush
that express-sse
can call that and have it do nothing, roughly:
res.flush = () => undefined;
@okkedek @t3hmrman @dpskvn res.flush()
is deprecated. Use res.flushHeaders()
instead.
- res.flush()
+ (res.flushHeaders || res.flush )()