--- krb5-1.10.1+dfsg.orig/src/lib/krb5/os/sendto_kdc.c
+++ krb5-1.10.1+dfsg/src/lib/krb5/os/sendto_kdc.c
@@ -1146,7 +1146,7 @@ service_fds(krb5_context context, struct
             int (*msg_handler)(krb5_context, const krb5_data *, void *),
             void *msg_handler_data, struct conn_state **winner_out)
 {
-    int e, selret = 0;
+    int e, selret = 0, anything_ok;
     struct timeval now;
     struct conn_state *state;
@@ -1173,11 +1173,15 @@ service_fds(krb5_context context, struct
             return 0;

         /* Got something on a socket, process it.  */
+       anything_ok= 0;
         for (state = conns; state != NULL; state = state->next) {
             int ssflags;

             if (state->fd == INVALID_SOCKET)
                 continue;
+
+           anything_ok++;
+
             ssflags = cm_get_ssflags(seltemp, state->fd);
             if (!ssflags)
                 continue;
@@ -1201,6 +1205,10 @@ service_fds(krb5_context context, struct
                 }
             }
         }
+
+       if (! anything_ok) {
+           return 1;
+       }
     }
     if (e != 0)
		return 1;
