Cleanup proxy conn setup in launch routine

master
xSmurf 10 years ago
parent 201037c26d
commit 9462c3584a

@ -135,16 +135,18 @@ func (d *daemonState) launch(p *oz.Profile, pwd string, args, env []string, uid,
sbox.ready.Add(1) sbox.ready.Add(1)
go sbox.logMessages() go sbox.logMessages()
go func () { if p.Networking.Nettype != "host" && len(p.Networking.Sockets) > 0 {
sbox.ready.Wait() go func() {
sbox.ready.Wait()
if p.Networking.Nettype != "host" && len(p.Networking.Sockets) > 0 {
err := network.ProxySetup(sbox.init.Process.Pid, p.Networking.Sockets, d.log, sbox.ready) err := network.ProxySetup(sbox.init.Process.Pid, p.Networking.Sockets, d.log, sbox.ready)
if err != nil { if err != nil {
log.Warning("Unable to create connection proxy: %+s", err) log.Warning("Unable to create connection proxy: %+s", err)
} }
} }()
}
go func () {
sbox.ready.Wait()
go sbox.launchProgram(pwd, args, log) go sbox.launchProgram(pwd, args, log)
}() }()

Loading…
Cancel
Save