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:
@ -79,7 +79,8 @@ static void raw_closing(Plug *plug, PlugCloseType type, const char *error_msg)
|
||||
seat_notify_remote_disconnect(raw->seat);
|
||||
}
|
||||
logevent(raw->logctx, error_msg);
|
||||
seat_connection_fatal(raw->seat, "%s", error_msg);
|
||||
if (type != PLUGCLOSE_USER_ABORT)
|
||||
seat_connection_fatal(raw->seat, "%s", error_msg);
|
||||
} else {
|
||||
/* Otherwise, the remote side closed the connection normally. */
|
||||
if (!raw->sent_console_eof && seat_eof(raw->seat)) {
|
||||
|
Reference in New Issue
Block a user