Skip to content

Commit

Permalink
lib/connections: Don't panic on removed device (fixes syncthing#5299) (
Browse files Browse the repository at this point in the history
  • Loading branch information
imsodin authored and calmh committed Oct 30, 2018
1 parent b1acc37 commit 01ade9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/connections/service.go
Expand Up @@ -245,7 +245,9 @@ next:

deviceCfg, ok := s.cfg.Device(remoteID)
if !ok {
panic("bug: unknown device should already have been rejected")
l.Infof("Device %s removed from config during connection attempt at %s", remoteID, c)
c.Close()
continue
}

// Verify the name on the certificate. By default we set it to
Expand Down

0 comments on commit 01ade9c

Please sign in to comment.