From a2dcffcca2f425d84ca45a1e7f4a67cc785cb65d Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sun, 26 Jun 2016 10:17:12 +0000 Subject: [PATCH] lib/nat: Avoid concurrent reset of NAT timer (fixes #3337) GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3341 --- lib/nat/service.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nat/service.go b/lib/nat/service.go index ad14e294..a04ea78b 100644 --- a/lib/nat/service.go +++ b/lib/nat/service.go @@ -44,9 +44,8 @@ func NewService(id protocol.DeviceID, cfg *config.Wrapper) *Service { func (s *Service) Serve() { announce := stdsync.Once{} - s.timer.Reset(0) - s.mut.Lock() + s.timer.Reset(0) s.stop = make(chan struct{}) s.mut.Unlock()