fix: admin/monitoring: wrong visualization of connections that were reused after a download
Massimo Melina committed
Jan 5, 2024 at 11:59 UTC
ca47026e38f4e8d0a16c0835b87847a4d2ac2b31
2 files changed
+2
-2
src/api.monitor.ts
+1
-1
@@ -89,7 +89,7 @@ const apis: ApiHandlers = {
89
upload: s.uploadProgress,
90
...s.browsing ? { op: 'browsing', path: decodeURIComponent(s.browsing) }
91
: s.uploadPath ? { op: 'upload',path: decodeURIComponent(s.uploadPath) }
92
- : (ctx.fileSource || s.archive) && { path: decodeURIComponent(ctx.path) }
92
+ : { path: decodeURIComponent(ctx.path) }
93
}
94
}
95
},
src/middlewares.ts
+1
-1
@@ -231,7 +231,7 @@ export const prepareState: Koa.Middleware = async (ctx, next) => {
231
ctx.state.revProxyPath = ctx.get('x-forwarded-prefix')
232
ctx.state.browsing = undefined
233
if (conn)
234
- updateConnection(conn, { ctx, op: undefined })
234
+ updateConnection(conn, { ctx, op: undefined, opOffset: undefined, opProgress: undefined, opTotal: undefined }) // reset
235
await next()
236
237
async function urlLogin() {