summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorperewa <cavalcante.ten@gmail.com>2016-06-08 19:46:54 +0000
committerJakob Borg <jakob@nym.se>2016-06-08 19:46:54 +0000
commit11b9212948d98f32e081d9b77ba6ac939005e797 (patch)
tree7fc13f1ac8c307ae7ba6db3dd1cc66b760e5cd3a
parentb4e2914b70f70d69f17e3f7227ee08665baa1a09 (diff)
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
-rw-r--r--lib/connections/service.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connections/service.go b/lib/connections/service.go
index bfbc2b9cc..52b4136a9 100644
--- a/lib/connections/service.go
+++ b/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{})