From 127b3b30668678c622f4a0b035738a7c9b6cc956 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 29 Mar 2018 10:35:46 +0200 Subject: [PATCH] Set websocket.terminal to None when the child exits This fixes an error I was seeing when exiting a terminal which is open in multiple tabs at the same time. The code path to resize the terminal to the smallest client window size was taken, which tries to communicate with the (now closed) terminal. --- terminado/websocket.py | 1 + 1 file changed, 1 insertion(+) diff --git a/terminado/websocket.py b/terminado/websocket.py index 3aab0ab..3d3fe39 100644 --- a/terminado/websocket.py +++ b/terminado/websocket.py @@ -100,3 +100,4 @@ def on_pty_died(self): """ self.send_json_message(['disconnect', 1]) self.close() + self.terminal = None