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)
go sbox.logMessages()
if p.Networking.Nettype != "host" && len(p.Networking.Sockets) > 0 {
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)
if err != nil {
log.Warning("Unable to create connection proxy: %+s", err)
}
}()
}
go func () {
sbox.ready.Wait()
go sbox.launchProgram(pwd, args, log)
}()

Loading…
Cancel
Save