krb5/krb5-1.9.1-sendto_poll2.patch

23 lines
777 B
Diff
Raw Normal View History

RT#6951
Index: krb5/src/lib/krb5/os/sendto_kdc.c
===================================================================
--- krb5/src/lib/krb5/os/sendto_kdc.c (revision 25119)
+++ krb5/src/lib/krb5/os/sendto_kdc.c (revision 25120)
@@ -913,12 +913,12 @@
static void
kill_conn(struct conn_state *conn, struct select_state *selstate, int err)
{
+ dprint("abandoning connection %d: %m\n", conn->fd, err);
+ cm_remove_fd(selstate, conn->fd);
+ closesocket(conn->fd);
+ conn->fd = INVALID_SOCKET;
conn->state = FAILED;
conn->err = err;
- shutdown(conn->fd, SHUTDOWN_BOTH);
- cm_remove_fd(selstate, conn->fd);
- dprint("abandoning connection %d: %m\n", conn->fd, err);
- /* Fix up max fd for next select call. */
}
/* Check socket for error. */