mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-24 00:43:08 +08:00
发送secret
This commit is contained in:
@@ -117,11 +117,11 @@ func (cfg *Engine) OnEvent(event any) {
|
|||||||
conn, _, _, err := ws.Dial(v, cfg.ConsoleURL)
|
conn, _, _, err := ws.Dial(v, cfg.ConsoleURL)
|
||||||
wr := &myResponseWriter{conn}
|
wr := &myResponseWriter{conn}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("connect to console server error:", err)
|
log.Error("connect to console server ", cfg.ConsoleURL, " ", err)
|
||||||
time.Sleep(time.Second * 5)
|
time.Sleep(time.Second * 5)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = wsutil.WriteClientMessage(conn, ws.OpText, []byte(`{"command":"init","secret":"123456"}`))
|
err = wsutil.WriteClientMessage(conn, ws.OpText, []byte(cfg.Secret))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
time.Sleep(time.Second * 5)
|
time.Sleep(time.Second * 5)
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user