* Marks this stream as aborted (will never push another `data` event) * and kills the underlying cursor. Will emit the 'end' event, and then * the 'close' event once the cursor is successfully killed.
()
| 201 | * the 'close' event once the cursor is successfully killed. |
| 202 | */ |
| 203 | async abort(): Promise<void> { |
| 204 | this.push(null); |
| 205 | this.destroy(); |
| 206 | const remainingTimeMS = this.s.timeoutContext?.getRemainingTimeMSOrThrow(); |
| 207 | await this.s.cursor?.close({ timeoutMS: remainingTimeMS }); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | function throwIfInitialized(stream: GridFSBucketReadStream): void { |
nothing calls this directly
no test coverage detected