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
This commit is contained in:
perewa 2016-06-08 19:46:54 +00:00 committed by Jakob Borg
parent b4e2914b70
commit 11b9212948
1 changed files with 1 additions and 1 deletions

View File

@ -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{})