@belmonddev/catch-request-express-middleware 3.3.2 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -150,8 +150,9 @@ const callIncomingRequestsCbs = (req, res, incomingRequestsCb, body) => {
150
150
  if (req.socketClosed) {
151
151
  callResponseCb(responseCb, res);
152
152
  } else {
153
- req.socket.on('timeout', () => {
154
- res.statusCode = null;
153
+ res.on('timeout', () => {
154
+ res.statusCode = 408;
155
+ res.end();
155
156
  });
156
157
  req.socket.on('close', () => {
157
158
  callResponseCb(responseCb, res);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@belmonddev/catch-request-express-middleware",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "main": "index.js",
5
5
  "author": "David Escalera",
6
6
  "license": "ISC",