5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 04:50:29 +00:00

Fix Android multicast crash (#930)

* Do not exit on multicast errors (mobile)

* Consistency with cmd/yggdrasil/main.go

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
Alexander Ivanov 2022-08-11 05:54:02 +08:00 committed by GitHub
parent 16b8149052
commit f8e626dbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,11 +62,8 @@ func (m *Yggdrasil) StartJSON(configjson []byte) error {
if len(m.config.MulticastInterfaces) > 0 {
if err := m.multicast.Init(&m.core, m.config, logger, nil); err != nil {
logger.Errorln("An error occurred initialising multicast:", err)
return err
}
if err := m.multicast.Start(); err != nil {
} else if err := m.multicast.Start(); err != nil {
logger.Errorln("An error occurred starting multicast:", err)
return err
}
}
return nil