(changeStreamError: AnyError)
| 1073 | } |
| 1074 | |
| 1075 | private async _resume(changeStreamError: AnyError) { |
| 1076 | this.timeoutContext?.refresh(); |
| 1077 | const topology = getTopology(this.parent); |
| 1078 | try { |
| 1079 | await topology.selectServer(this.cursor.readPreference, { |
| 1080 | operationName: 'reconnect topology in change stream', |
| 1081 | timeoutContext: this.timeoutContext, |
| 1082 | deprioritizedServers: new DeprioritizedServers() |
| 1083 | }); |
| 1084 | this.cursor = this._createChangeStreamCursor(this.cursor.resumeOptions); |
| 1085 | } catch { |
| 1086 | // if the topology can't reconnect, close the stream |
| 1087 | await this.close(); |
| 1088 | throw changeStreamError; |
| 1089 | } |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | /** |
no test coverage detected