Pārlūkot izejas kodu

main: fix dropped error (#1002)

This isn't an actual issue because the current implementation of NewSSHServer never returns an error (https://github.com/slackhq/nebula/blob/v1.7.2/sshd/server.go#L56), but still good to fix so no surprises happen in the future.
Lars Lehtonen 1 gadu atpakaļ
vecāks
revīzija
77a8ce1712
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      main.go

+ 3 - 0
main.go

@@ -71,6 +71,9 @@ func Main(c *config.C, configTest bool, buildVersion string, logger *logrus.Logg
 	tunCidr := certificate.Details.Ips[0]
 
 	ssh, err := sshd.NewSSHServer(l.WithField("subsystem", "sshd"))
+	if err != nil {
+		return nil, util.ContextualizeIfNeeded("Error while creating SSH server", err)
+	}
 	wireSSHReload(l, ssh, c)
 	var sshStart func()
 	if c.GetBool("sshd.enabled", false) {