1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

ssh_closing: distinguish socket errors from EOF.

I forgot to check the error_msg parameter at all.
This commit is contained in:
Simon Tatham 2018-09-27 18:06:16 +01:00
parent c912d0936d
commit ed0104c2fe

4
ssh.c
View File

@ -507,7 +507,9 @@ static void ssh_closing(Plug plug, const char *error_msg, int error_code,
int calling_back)
{
Ssh ssh = FROMFIELD(plug, struct ssh_tag, plugvt);
if (ssh->bpp) {
if (error_msg) {
ssh_remote_error(ssh, "Network error: %s", error_msg);
} else if (ssh->bpp) {
ssh->bpp->input_eof = TRUE;
queue_idempotent_callback(&ssh->bpp->ic_in_raw);
}