Be slightly pickier about going into fail-open mode.
authorBen Pfaff <blp@nicira.com>
Mon, 28 Jul 2008 14:08:38 +0000 (07:08 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 28 Jul 2008 14:08:38 +0000 (07:08 -0700)
commitf873bed0573bc5fcabb9dba285ed259c9d45fbae
treef5cce76c552a626ae50506d1f4017b7ae8caae40
parentf12a5936173a7182fec670b2891137fc66adc929
Be slightly pickier about going into fail-open mode.

Before, the amount of time disconnected was measured relative to the
last time we connected, that is, the last time connect(2) succeeded.
Thus, if we were connected for a long time, and then disconnected,
we would immediately go into fail-open mode.

This change make the disconnected time relative to the last OpenFlow
message received.  Thus, if we are connected for a long time and
receive plenty of packets, and then disconnect, there will still be
an opportunity to reconnect before failing open.
lib/rconn.c