summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/fsm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go
index d853592d..25aefaa2 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -827,7 +827,7 @@ func (h *FSMHandler) sendMessageloop() error {
fsm.bgpMessageStateUpdate(0, false)
return nil
}
- if err := conn.SetWriteDeadline(time.Now().Add(time.Second * 30)); err != nil {
+ if err := conn.SetWriteDeadline(time.Now().Add(time.Second * time.Duration(fsm.negotiatedHoldTime))); err != nil {
h.errorCh <- true
conn.Close()
return fmt.Errorf("failed to set write deadline")