mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/ctrld: fatal if failed to get default iface name
So it left a chance for system service manager to bring up ctrld for us. Without default iface name, ctrld could not work properly anyway.
This commit is contained in:
committed by
Cuong Manh Le
parent
d3fe2c730c
commit
8571580aae
@@ -662,7 +662,7 @@ func netInterface(ifaceName string) (*net.Interface, error) {
|
||||
func defaultIfaceName() string {
|
||||
dri, err := interfaces.DefaultRouteInterface()
|
||||
if err != nil {
|
||||
mainLog.Error().Err(err).Msg("failed to get default route interface")
|
||||
mainLog.Fatal().Err(err).Msg("failed to get default route interface")
|
||||
}
|
||||
return dri
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user