summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/fsm.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-10-29 18:27:37 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-10-29 18:27:37 +0900
commitc8694bc8a7dccd663689f8d134b89fe3a1f37d70 (patch)
tree2539bed4de902626cdacad748caddbd4294d5919 /pkg/server/fsm.go
parent0b4d946298c6aca479dc79b578adb9ae0da1a850 (diff)
server: unexport Peer adn PeerGroup
No need to export them. Also fixed golint errors. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg/server/fsm.go')
-rw-r--r--pkg/server/fsm.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/server/fsm.go b/pkg/server/fsm.go
index 4830feb2..6a8fd942 100644
--- a/pkg/server/fsm.go
+++ b/pkg/server/fsm.go
@@ -408,8 +408,8 @@ func (fsm *FSM) connectLoop() error {
fsm.lock.RLock()
tick := int(fsm.pConf.Timers.Config.ConnectRetry)
fsm.lock.RUnlock()
- if tick < MIN_CONNECT_RETRY {
- tick = MIN_CONNECT_RETRY
+ if tick < minConnectRetry {
+ tick = minConnectRetry
}
r := rand.New(rand.NewSource(time.Now().UnixNano()))
@@ -438,7 +438,7 @@ func (fsm *FSM) connectLoop() error {
d := tcpDialer{
Dialer: net.Dialer{
LocalAddr: laddr,
- Timeout: time.Duration(MIN_CONNECT_RETRY-1) * time.Second,
+ Timeout: time.Duration(minConnectRetry-1) * time.Second,
},
AuthPassword: fsm.pConf.Config.AuthPassword,
}
@@ -493,7 +493,7 @@ func (fsm *FSM) connectLoop() error {
go connect()
}
case <-fsm.getActiveCh:
- timer.Reset(time.Duration(r.Intn(MIN_CONNECT_RETRY)+MIN_CONNECT_RETRY) * time.Second)
+ timer.Reset(time.Duration(r.Intn(minConnectRetry)+minConnectRetry) * time.Second)
}
}
}