Check this.connection._httpMessage for null
httpmasterland_in_v0.12
When using express-ws, I've noticed a TypeError is thrown in early terminating router middleware. Here is code to reproduce the error:
```
var app = require('express')();
var expressWs = require('express-ws')(app);
// Terminating middleware
app.use('/ws', function(req, res, next) {
try {
return res.status(500).end();
} catch(ex) {
console.log(ex.name, ex.message);
}
});
app.ws('/ws', function(ws, req) { });
app.listen(8888);
```
Package versions:
```
express: 4.13.1
express-ws: 0.2.6
```
合并状态:未合并 关闭于 2023-04-22 6 条评论