(closable: { close(): void })
| 70 | // When the socket is completed / disposed, close all the event |
| 71 | // listeners and shutdown the socket |
| 72 | const closer = (closable: { close(): void }) => { |
| 73 | try { |
| 74 | closable.close(); |
| 75 | } catch (ex) { |
| 76 | logger.error(`Error during socket shutdown`, ex); |
| 77 | } |
| 78 | }; |
| 79 | closer(this.channels.control); |
| 80 | closer(this.channels.iopub); |
| 81 | closer(this.channels.shell); |