mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #12989 from overleaf/jpa-req-socket-null
[misc] add patches for gracefully handling missing req.socket/connection GitOrigin-RevId: fd0b067d5a4b5a96857ac94a577460b82bba7672
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
diff --git a/node_modules/finalhandler/index.js b/node_modules/finalhandler/index.js
|
||||
index 5673507..40f4684 100644
|
||||
--- a/node_modules/finalhandler/index.js
|
||||
+++ b/node_modules/finalhandler/index.js
|
||||
@@ -125,7 +125,7 @@ function finalhandler (req, res, options) {
|
||||
// cannot actually respond
|
||||
if (headersSent(res)) {
|
||||
debug('cannot %d after headers sent', status)
|
||||
- req.socket.destroy()
|
||||
+ if (req.socket) req.socket.destroy()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user