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

Improve socket error handling so that a socket error isn't an

automatic fatalbox(). Instead, the error is passed to the receiver
routine, which can decide just how fatal the problem really is.

[originally from svn r894]
This commit is contained in:
Simon Tatham
2001-01-24 10:11:18 +00:00
parent 3082f7e8be
commit 89505459e3
7 changed files with 52 additions and 6 deletions

View File

@ -461,6 +461,11 @@ static void do_telnet_read (char *buf, int len) {
}
static int telnet_receive(Socket s, int urgent, char *data, int len) {
if (urgent==3) {
/* A socket error has occurred. */
connection_fatal(data);
len = 0;
}
if (!len) {
/* Connection has closed. */
sk_close(s);