forked from x/icebergs
opt some
This commit is contained in:
parent
dffc592aa1
commit
e73f29d130
@ -27,8 +27,8 @@ func _serve_start(m *ice.Message) {
|
||||
kit.If(m.Option(aaa.USERNAME), func() { aaa.UserRoot(m, m.Option(aaa.USERNICK), m.Option(aaa.USERNAME)) })
|
||||
kit.If(m.Option(tcp.PORT) == tcp.RANDOM, func() { m.Option(tcp.PORT, m.Cmdx(tcp.PORT, aaa.RIGHT)) })
|
||||
kit.If(cli.IsWindows(), func() {
|
||||
m.Go(func() { m.Cmd(SPIDE, ice.OPS, _serve_address(m)+"/exit") })
|
||||
m.Sleep30ms()
|
||||
m.Go(func() { m.Cmd(SPIDE, ice.OPS, _serve_address(m)+"/exit", ice.Maps{CLIENT_TIMEOUT: "30ms"}) })
|
||||
m.Sleep("30ms")
|
||||
})
|
||||
cli.NodeInfo(m, kit.Select(ice.Info.Hostname, m.Option(tcp.NODENAME)), SERVER)
|
||||
m.Start("", m.OptionSimple(tcp.HOST, tcp.PORT)...)
|
||||
|
@ -48,7 +48,7 @@ func _spide_show(m *ice.Message, name string, arg ...string) {
|
||||
return
|
||||
}
|
||||
mdb.HashSelectDetail(m, name, func(value ice.Map) { _spide_head(m, req, head, value) })
|
||||
res, e := _spide_send(m, name, req, kit.Format(msg.Append(CLIENT_TIMEOUT)))
|
||||
res, e := _spide_send(m, name, req, kit.Format(m.OptionDefault(CLIENT_TIMEOUT, msg.Append(CLIENT_TIMEOUT))))
|
||||
if m.Warn(e, ice.ErrNotFound, uri) {
|
||||
return
|
||||
}
|
||||
|
2
init.go
2
init.go
@ -84,7 +84,7 @@ func Run(arg ...string) string {
|
||||
} else {
|
||||
arg = append(arg, FOREVER, START)
|
||||
}
|
||||
} else if arg[0] == FOREVER && runtime.GOOS == "windows" {
|
||||
} else if arg[0] == FOREVER && !kit.IsIn(arg[1], "restart", "stop") && runtime.GOOS == "windows" {
|
||||
arg[0] = SERVE
|
||||
}
|
||||
Pulse.meta[MSG_DETAIL] = arg
|
||||
|
Loading…
x
Reference in New Issue
Block a user