diff --git a/spyderlib/plugins/ipythonconsole.py b/spyderlib/plugins/ipythonconsole.py
index <HASH>..<HASH> 100644
--- a/spyderlib/plugins/ipythonconsole.py
+++ b/spyderlib/plugins/ipythonconsole.py
@@ -608,9 +608,12 @@ class IPythonClient(QWidget, SaveHistoryMixin):
     

     #---- Qt methods ----------------------------------------------------------

     def closeEvent(self, event):

-        """Reimplement Qt method to stop sending the custom_restart_kernel_died

-        signal"""

-        self.ipywidget.custom_restart = False

+        """

+        Reimplement Qt method to stop sending the custom_restart_kernel_died

+        signal

+        """

+        kc = self.ipywidget.kernel_client

+        kc.hb_channel.pause()

             

 

 class IPythonConsole(SpyderPluginWidget):
IPython console: Pause the heartbeat channel when a console is closed

- Without this change we get an infinite stream of warnings printed in the
internal console mentioning a "kernel died" issue.