1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-07-08 13:51:21 +08:00
parent dffc592aa1
commit e73f29d130
3 changed files with 4 additions and 4 deletions

View File

@ -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(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(m.Option(tcp.PORT) == tcp.RANDOM, func() { m.Option(tcp.PORT, m.Cmdx(tcp.PORT, aaa.RIGHT)) })
kit.If(cli.IsWindows(), func() { kit.If(cli.IsWindows(), func() {
m.Go(func() { m.Cmd(SPIDE, ice.OPS, _serve_address(m)+"/exit") }) m.Go(func() { m.Cmd(SPIDE, ice.OPS, _serve_address(m)+"/exit", ice.Maps{CLIENT_TIMEOUT: "30ms"}) })
m.Sleep30ms() m.Sleep("30ms")
}) })
cli.NodeInfo(m, kit.Select(ice.Info.Hostname, m.Option(tcp.NODENAME)), SERVER) cli.NodeInfo(m, kit.Select(ice.Info.Hostname, m.Option(tcp.NODENAME)), SERVER)
m.Start("", m.OptionSimple(tcp.HOST, tcp.PORT)...) m.Start("", m.OptionSimple(tcp.HOST, tcp.PORT)...)

View File

@ -48,7 +48,7 @@ func _spide_show(m *ice.Message, name string, arg ...string) {
return return
} }
mdb.HashSelectDetail(m, name, func(value ice.Map) { _spide_head(m, req, head, value) }) 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) { if m.Warn(e, ice.ErrNotFound, uri) {
return return
} }

View File

@ -84,7 +84,7 @@ func Run(arg ...string) string {
} else { } else {
arg = append(arg, FOREVER, START) 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 arg[0] = SERVE
} }
Pulse.meta[MSG_DETAIL] = arg Pulse.meta[MSG_DETAIL] = arg