|
@@ -585,7 +585,10 @@ export class ClientSession implements IClientSession {
|
|
|
}
|
|
|
let session = this._session;
|
|
|
if (session && session.status !== 'dead') {
|
|
|
- return session.changeKernel(options);
|
|
|
+ return session.changeKernel(options).catch(err => {
|
|
|
+ void this._handleSessionError(err);
|
|
|
+ return Promise.reject(err);
|
|
|
+ });
|
|
|
} else {
|
|
|
return this._startSession(options);
|
|
|
}
|