on createServer autostart after create
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
17ab80f09c
commit
77a5cc3a86
4
lib.go
4
lib.go
|
@ -1018,7 +1018,6 @@ func CreateServer(password string, description string, autostart bool) {
|
||||||
s.SetAttribute(server.AttrDescription, description)
|
s.SetAttribute(server.AttrDescription, description)
|
||||||
if autostart {
|
if autostart {
|
||||||
s.SetAttribute(server.AttrAutostart, "true")
|
s.SetAttribute(server.AttrAutostart, "true")
|
||||||
LaunchServer(s.Onion())
|
|
||||||
} else {
|
} else {
|
||||||
s.SetAttribute(server.AttrAutostart, "false")
|
s.SetAttribute(server.AttrAutostart, "false")
|
||||||
}
|
}
|
||||||
|
@ -1032,6 +1031,9 @@ func CreateServer(password string, description string, autostart bool) {
|
||||||
ev := event.NewEvent(servers.NewServer, make(map[event.Field]string))
|
ev := event.NewEvent(servers.NewServer, make(map[event.Field]string))
|
||||||
serverInfo.EnrichEvent(&ev)
|
serverInfo.EnrichEvent(&ev)
|
||||||
application.GetPrimaryBus().Publish(ev)
|
application.GetPrimaryBus().Publish(ev)
|
||||||
|
if autostart {
|
||||||
|
LaunchServer(s.Onion())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue