(proto): be more careful and don't print errno when read() returns 0
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7141 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -467,10 +467,15 @@ proto (int s, int errsock,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (net_read (s, &reply, 1) != 1) {
|
||||
ret = net_read (s, &reply, 1);
|
||||
if (ret < 0) {
|
||||
warn ("read");
|
||||
close (errsock2);
|
||||
return 1;
|
||||
} else if (ret == 0) {
|
||||
warnx ("unexpected EOF from %s", hostname);
|
||||
close (errsock2);
|
||||
return 1;
|
||||
}
|
||||
if (reply != 0) {
|
||||
|
||||
|
Reference in New Issue
Block a user