X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/89adc0e26d9020cfbe23fd4b0eec5ff33055a694..2425184bb0dd4cf3924f717c0b07c2ca6e7da4e6:/ssh.c diff --git a/ssh.c b/ssh.c index 0435dd7e..7f3748af 100644 --- a/ssh.c +++ b/ssh.c @@ -2517,6 +2517,9 @@ static int ssh_closing(Plug plug, const char *error_msg, int error_code, 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); @@ -2524,8 +2527,6 @@ static int ssh_closing(Plug plug, const char *error_msg, int error_code, } else { logevent("Server closed network connection"); } - if (need_notify) - notify_remote_exit(ssh->frontend); return 0; }