OVSDB library: Close conneciton when peer is down 36/35436/5
authorHsin-Yi Shen <syshen66@gmail.com>
Thu, 25 Feb 2016 23:54:41 +0000 (15:54 -0800)
committerHsin-Yi Shen <syshen66@gmail.com>
Sun, 13 Mar 2016 22:53:17 +0000 (22:53 +0000)
commit25ce7ab4b34777d98d6933a8c192785a1298ccd9
tree482ab8b0d1da13269d6e85207ce8e8302fdf55e2
parent4dfdea89b083541327d611d34ebdbd9ddb3fdc94
OVSDB library: Close conneciton when peer is down

In current implementation connection is not closed when peer is down
before it has chance to send TCP FIN packet. We have seen this issue
when peer is power off or crashed. With this fix, OVSDB server will
get IdleState.READER_IDLE event and send echo message to peer when
no channel read is performed for 60 seconds. OVSDB server will also
receive ReadTimeoutException and close the connection after 600 seconds.

Bug: 5506
Change-Id: I602b2ba3d34bc5e09546fe4e0584d8d0db42867e
Signed-off-by: Hsin-Yi Shen <syshen66@gmail.com>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionInstance.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/OvsdbClient.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnection.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbClientImpl.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/ExceptionHandler.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstance.java