diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-05-20 05:58:38 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-05-20 06:10:34 +0000 |
commit | d22476cb3175ab02730ce1db7d8c9b515460e5a7 (patch) | |
tree | 7927d40e9f68f61e5dd6d10ea97cd97258bb4e08 /server/monitor.go | |
parent | c2a0e730ec4fa7354388a178b9e54ad94b0c22ba (diff) |
server: fix connectLoop() select loop not to block
connect() blocks MIN_CONNECT_RETRY-1 (= 9sec) at most.
If a passive connection comes, establish BGP sessions, then BGP sesions
goes down right after that (this can happen when the peer sent invalid
update messages etc..) while connect() is blocking,
FSM.StateChange(), which writes to fsm.getActiveCh can also block.
This leads to block the main goroutine in server.go.
This commit fix the issue by invoking a goroutine for connect() each
time.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/monitor.go')
0 files changed, 0 insertions, 0 deletions