mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 08:07:37 -05:00
f60e86a71d
[misc] add patches for gracefully handling missing req.socket/connection GitOrigin-RevId: fd0b067d5a4b5a96857ac94a577460b82bba7672
13 lines
554 B
Diff
13 lines
554 B
Diff
diff --git a/node_modules/express/node_modules/finalhandler/index.js b/node_modules/express/node_modules/finalhandler/index.js
|
|
index f628e42..72f17d6 100644
|
|
--- a/node_modules/express/node_modules/finalhandler/index.js
|
|
+++ b/node_modules/express/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
|
|
}
|
|
|