projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Improve socket error handling so that a socket error isn't an
[u/mdw/putty]
/
ssh.c
diff --git
a/ssh.c
b/ssh.c
index
ee320af
..
3845264
100644
(file)
--- a/
ssh.c
+++ b/
ssh.c
@@
-1148,6
+1148,11
@@
static void ssh_gotdata(unsigned char *data, int datalen)
}
static int ssh_receive(Socket skt, int urgent, char *data, int len) {
+ if (urgent==3) {
+ /* A socket error has occurred. */
+ connection_fatal(data);
+ len = 0;
+ }
if (!len) {
/* Connection has closed. */
ssh_state = SSH_STATE_CLOSED;