From 77a5cc3a864a098e51d131873a593fa3560454ed Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 3 Nov 2021 11:56:20 -0700 Subject: [PATCH] on createServer autostart after create --- lib.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib.go b/lib.go index 9d1feea..1156871 100644 --- a/lib.go +++ b/lib.go @@ -1018,7 +1018,6 @@ func CreateServer(password string, description string, autostart bool) { s.SetAttribute(server.AttrDescription, description) if autostart { s.SetAttribute(server.AttrAutostart, "true") - LaunchServer(s.Onion()) } else { 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)) serverInfo.EnrichEvent(&ev) application.GetPrimaryBus().Publish(ev) + if autostart { + LaunchServer(s.Onion()) + } } } } -- 2.25.1