--- a/src/Pure/PIDE/session.scala Fri Aug 07 21:02:02 2020 +0200
+++ b/src/Pure/PIDE/session.scala Fri Aug 07 21:21:44 2020 +0200
@@ -555,6 +555,7 @@
debugger.ready()
case Markup.Process_Result(result) if output.is_exit =>
+ if (prover.defined) protocol_handlers.exit()
file_formats.stop_session
phase = Session.Terminated(result)
prover.reset
@@ -596,7 +597,6 @@
consolidation.exit()
delay_prune.revoke()
if (prover.defined) {
- protocol_handlers.exit()
global_state.change(_ => Document.State.init)
prover.get.terminate
}