1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-19 03:51:02 -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

5
raw.c
View File

@ -25,6 +25,11 @@ static void c_write (char *buf, int len) {
}
static int raw_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);