Browse Source

cmd/syncthing: Increase timeout in hello message exchange

Required to establish connections on high latency links

Skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3286
perewa 9 years ago
parent
commit
11b9212948
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/connections/service.go

+ 1 - 1
lib/connections/service.go

@@ -554,7 +554,7 @@ func (s *Service) getListenerFactory(cfg config.Configuration, uri *url.URL) (li
 }
 
 func exchangeHello(c net.Conn, h protocol.HelloMessage) (protocol.HelloMessage, error) {
-	if err := c.SetDeadline(time.Now().Add(2 * time.Second)); err != nil {
+	if err := c.SetDeadline(time.Now().Add(20 * time.Second)); err != nil {
 		return protocol.HelloMessage{}, err
 	}
 	defer c.SetDeadline(time.Time{})