MCPcopy Index your code
hub / github.com/deepnote/deepnote / disconnect

Method disconnect

packages/runtime-core/src/kernel-client.ts:168–190  ·  view source on GitHub ↗

* Disconnect from the kernel and clean up resources.

()

Source from the content-addressed store, hash-verified

166 * Disconnect from the kernel and clean up resources.
167 */
168 async disconnect(): Promise<void> {
169 if (this.session) {
170 try {
171 await this.session.shutdown()
172 } catch {
173 // Ignore shutdown errors
174 }
175 this.session.dispose()
176 this.session = null
177 }
178
179 if (this.sessionManager) {
180 this.sessionManager.dispose()
181 this.sessionManager = null
182 }
183
184 if (this.kernelManager) {
185 this.kernelManager.dispose()
186 this.kernelManager = null
187 }
188
189 this.kernel = null
190 }
191
192 /**
193 * Convert a Jupyter message to an IOutput object.

Callers 3

connectMethod · 0.95
stopMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected