* Frees the internal resources used by the change stream.
()
| 845 | * Frees the internal resources used by the change stream. |
| 846 | */ |
| 847 | async close(): Promise<void> { |
| 848 | this.timeoutContext?.clear(); |
| 849 | this.timeoutContext = undefined; |
| 850 | this.isClosed = true; |
| 851 | |
| 852 | const cursor = this.cursor; |
| 853 | try { |
| 854 | await cursor.close(); |
| 855 | } finally { |
| 856 | this._endStream(); |
| 857 | } |
| 858 | } |
| 859 | |
| 860 | /** |
| 861 | * Return a modified Readable stream including a possible transform method. |
no test coverage detected