Otherwise, the TCP/IP implementation is responsible for connection
attempt backoff, but we want to have some control over it ourselves.
In particular we want to initially back off faster and to log a
message upon connection attempt retransmission, to make it easier
to see what has happened from the log.
#include "buffer.h"
#include "poll-loop.h"
#include "ofp-print.h"
+#include "timeval.h"
#include "util.h"
#include "vconn.h"
} else if (error != EAGAIN) {
VLOG_WARN("%s: connection failed (%s)", rc->name, strerror(error));
disconnect(rc, 0);
+ } else if (time(0) >= rc->backoff_deadline) {
+ VLOG_WARN("%s: connection timed out", rc->name);
+ rc->backoff_deadline = TIME_MAX; /* Prevent resetting backoff. */
+ disconnect(rc, 0);
}
} else {
if (rc->probe_interval) {