1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 19:42:48 -05:00

New plug_closing error type for 'user abort'.

This is generated when setup of a network connection is cancelled by
deliberate user action, namely, pressing ^C or ^D or the like at a
get_userpass_input prompt presented during proxy setup.

It's handled just like normal socket setup errors, except that it
omits the call to seat_connection_fatal, on the grounds that in this
one case of connection-setup failure, the user doesn't need to be
_informed_ that the connection failed - they already know, because
they failed it themself on purpose.
This commit is contained in:
Simon Tatham
2021-11-06 13:31:09 +00:00
parent 0fe41294e6
commit 2ae338b407
7 changed files with 26 additions and 17 deletions

View File

@ -656,7 +656,8 @@ static void telnet_closing(Plug *plug, PlugCloseType type,
}
if (type != PLUGCLOSE_NORMAL) {
logevent(telnet->logctx, error_msg);
seat_connection_fatal(telnet->seat, "%s", error_msg);
if (type != PLUGCLOSE_USER_ABORT)
seat_connection_fatal(telnet->seat, "%s", error_msg);
}
/* Otherwise, the remote side closed the connection normally. */
}