Browse Source

Fix filestore-readonly crash from ERR_STREAM_UNABLE_TO_PIPE

GitOrigin-RevId: 405ad3210132702fffecdc091066321bc1ccc10c
Anna Claire Fields 6 tháng trước cách đây
mục cha
commit
aa3715bd66
1 tập tin đã thay đổi với 5 bổ sung và 0 xóa
  1. 5 0
      services/filestore/app/js/FileController.js

+ 5 - 0
services/filestore/app/js/FileController.js

@@ -62,6 +62,11 @@ function getFile(req, res, next) {
         return
       }
 
+      if (res.destroyed) {
+        fileStream.destroy()
+        return
+      }
+
       if (req.query.cacheWarm) {
         fileStream.destroy()
         return res.sendStatus(200).end()