Merge pull request #19 from aisk/master

fix: ignore timeout event in websocket
dependabot/npm_and_yarn/mixin-deep-1.3.2
wchen 8 years ago committed by GitHub
commit 22e2f0c8f5
  1. 5
      app.js

@ -44,6 +44,11 @@ app.use(function(req, res, next) {
// error handlers
app.use(function(err, req, res, next) { // jshint ignore:line
if (req.timedout && req.headers.upgrade === 'websocket') {
// 忽略 websocket 的超时
return;
}
var statusCode = err.status || 500;
if(statusCode === 500) {
console.error(err.stack || err);

Loading…
Cancel
Save