Improve tun/udp init error messages

This commit is contained in:
Nate Brown 2019-11-22 16:18:33 -08:00
parent 6412e10d9b
commit 3b1826740e
1 changed files with 2 additions and 2 deletions

View File

@ -112,14 +112,14 @@ func Main(configPath string, configTest bool, buildVersion string) {
config.GetInt("tun.tx_queue", 500), config.GetInt("tun.tx_queue", 500),
) )
if err != nil { if err != nil {
l.Fatal(err) l.WithError(err).Fatal("Failed to get a tun/tap device")
} }
// set up our UDP listener // set up our UDP listener
udpQueues := config.GetInt("listen.routines", 1) udpQueues := config.GetInt("listen.routines", 1)
udpServer, err := NewListener(config.GetString("listen.host", "0.0.0.0"), config.GetInt("listen.port", 0), udpQueues > 1) udpServer, err := NewListener(config.GetString("listen.host", "0.0.0.0"), config.GetInt("listen.port", 0), udpQueues > 1)
if err != nil { if err != nil {
l.Fatal(err) l.WithError(err).Fatal("Failed to open udp listener")
} }
udpServer.reloadConfig(config) udpServer.reloadConfig(config)