(handle_tcp): handle recvfrom returning 0 (connection closed)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12619 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -704,6 +704,11 @@ handle_tcp(struct descr *d, int index, int min_free)
|
|||||||
if(n < 0){
|
if(n < 0){
|
||||||
krb5_warn(context, errno, "recvfrom");
|
krb5_warn(context, errno, "recvfrom");
|
||||||
return;
|
return;
|
||||||
|
} else if (n == 0) {
|
||||||
|
krb5_warnx(context, "connection closed before end of data after %d "
|
||||||
|
"bytes from %s", d[index].len, d[index].addr_string);
|
||||||
|
clear_descr (d + index);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (grow_descr (&d[index], n))
|
if (grow_descr (&d[index], n))
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user