Remove locked assets from shares
This commit is contained in:
@@ -6,12 +6,9 @@ export class IdleTimeoutError extends Error {}
|
||||
/**
|
||||
* A pass-through Transform that destroys itself when fewer than `minBytes`
|
||||
* flow through it in any `idleMs` interval. The check is armed when the
|
||||
* transform is created, so a body that never starts also times out.
|
||||
*
|
||||
* With `minBytes` left at 1 this is a plain idle timeout: a slow-but-steady
|
||||
* stream keeps going, a stalled one fails. A higher `minBytes` is a floor on
|
||||
* throughput, which stops a trickle of one byte a minute holding the
|
||||
* resources an upload reserved for as long as the sender likes.
|
||||
* transform is created, so a body that never starts also times out. With
|
||||
* `minBytes` left at 1 this is a plain idle timeout; a higher value is a
|
||||
* floor on throughput.
|
||||
*/
|
||||
export function createIdleTimeoutStream (idleMs: number, minBytes = 1): Transform {
|
||||
let received = 0
|
||||
|
||||
Reference in New Issue
Block a user