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:
5
telnet.c
5
telnet.c
@ -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);
|
||||
|
Reference in New Issue
Block a user