Browse Source

Fix handling of kernel change

Steven Silvester 7 years ago
parent
commit
a8b8de3346
1 changed files with 2 additions and 4 deletions
  1. 2 4
      packages/services/src/session/default.ts

+ 2 - 4
packages/services/src/session/default.ts

@@ -282,10 +282,8 @@ class DefaultSession implements Session.ISession {
     }
     let data = JSON.stringify({ kernel: options });
     if (this._kernel) {
-      return this._kernel.ready.then(() => {
-        this._kernel.dispose();
-        return this._patch(data);
-      }).then(() => this.kernel);
+      this._kernel.dispose();
+      this._statusChanged.emit('restarting');
     }
     return this._patch(data).then(() => this.kernel);
   }