diff options
author | Minteck <contact@minteck.org> | 2022-04-14 14:34:23 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-04-14 14:34:23 +0200 |
commit | 3bd506cfc8193e6dbc788892cca33e3a5444a95b (patch) | |
tree | 4b7efab680420a32db105523511692c9ed5f21a1 /server/http.js | |
parent | ad697968c1584ddab23af11a862b77987f9af86d (diff) | |
download | rainbow-3bd506cfc8193e6dbc788892cca33e3a5444a95b.tar.gz rainbow-3bd506cfc8193e6dbc788892cca33e3a5444a95b.tar.bz2 rainbow-3bd506cfc8193e6dbc788892cca33e3a5444a95b.zip |
Fix ERR_STREAM_WRITE_AFTER_END when errored
Diffstat (limited to 'server/http.js')
-rw-r--r-- | server/http.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/http.js b/server/http.js index a9a4358..68b0b70 100644 --- a/server/http.js +++ b/server/http.js @@ -192,8 +192,10 @@ module.exports.start = function () { 'Content-Type': "text/plain", 'Set-Cookie': '__mpws_request=' + year + month + day + hour + min + sec }); - res.write(e.stack); - res.end(); + try { + res.write(e.stack); + res.end(); + } catch (e) {} } return; } else { |