+ } else if (ret == ECONNREFUSED) {
+ time_t dist = now->tv_sec - ut->last_unreachable;
+
+ if (dist <= UDP_MAX_UNREACHABLE_TIME) {
+ return 0;
+ } else if (dist > 2 * UDP_MAX_UNREACHABLE_TIME) {
+ ut->last_unreachable = now->tv_sec;
+ return 0;
+ } else {
+ /*
+ * unreachable_time < dist <= 2 * unreachable_time
+ * No errors are allowed during this time window.
+ */
+ PARA_NOTICE_LOG("Evicting %s after %d seconds "
+ "of connection errors.\n",
+ sc->name, (int)dist);
+ }
+ }
+ return -ERRNO_TO_PARA_ERROR(ret);
+}
+
+static void udp_send_fec(struct sender_client *sc, char *buf, size_t len)
+{
+ int ret;
+
+ if (sender_status == SENDER_OFF)
+ return;
+ if (len == 0)
+ return;
+ ret = udp_check_socket_state(sc);