connection_fatal(), since the latter is entitled to destroy the
backend so `ssh' may no longer be valid once it returns.
For the Unix port, switch exit(0) to gtk_main_quit() in
notify_remote_exit(), so that we don't exit before the subsequent
connection_fatal()!
git-svn-id: svn://svn.tartarus.org/sgt/putty@5445
cda61777-01e9-0310-a592-
d414129be87e
error_msg = "Server unexpectedly closed network connection";
}
+ if (need_notify)
+ notify_remote_exit(ssh->frontend);
+
if (error_msg) {
/* A socket error has occurred. */
logevent(error_msg);
} else {
logevent("Server closed network connection");
}
- if (need_notify)
- notify_remote_exit(ssh->frontend);
return 0;
}
inst->exited = TRUE;
if (inst->cfg.close_on_exit == FORCE_ON ||
(inst->cfg.close_on_exit == AUTO && exitcode == 0))
- exit(0); /* just go. */
+ gtk_main_quit(); /* just go */
if (inst->ldisc) {
ldisc_free(inst->ldisc);
inst->ldisc = NULL;