From ec278710f10c2cae7d6b3e393aa957edfd536181 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sun, 18 Jan 2015 16:04:13 +0900 Subject: server: support idlehold time after reset After resetting a peer, the peer will remain idle for idlehold time (by default 30 seconds). It can be configured via IdleHoldTImeAfterReset. Signed-off-by: FUJITA Tomonori --- config/default.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/default.go') diff --git a/config/default.go b/config/default.go index 1b9b59c5..f4a2e301 100644 --- a/config/default.go +++ b/config/default.go @@ -1,7 +1,8 @@ package config const ( - DEFAULT_HOLDTIME = 90 + DEFAULT_HOLDTIME = 90 + DEFAULT_IDLE_HOLDTIME_AFTER_RESET = 30 ) func setTimersTypeDefault(timersT *TimersType) { @@ -11,6 +12,9 @@ func setTimersTypeDefault(timersT *TimersType) { if timersT.KeepaliveInterval == 0 { timersT.KeepaliveInterval = timersT.HoldTime / 3 } + if timersT.IdleHoldTImeAfterReset == 0 { + timersT.IdleHoldTImeAfterReset = float64(DEFAULT_IDLE_HOLDTIME_AFTER_RESET) + } } func SetNeighborTypeDefault(neighborT *NeighborType) { -- cgit v1.2.3