Merge pull request #15 from lwch/master

修改OnRewriteConfigure回调规则
This commit is contained in:
李文超
2022-08-10 15:27:03 +08:00
committed by GitHub

View File

@@ -99,7 +99,8 @@ func (app *app) waitHandshake(conn *websocket.Conn, timeout time.Duration) error
if !msg.Handshake.OK {
return errors.New(msg.Handshake.Msg)
}
if len(msg.Handshake.ID) > 0 {
if len(msg.Handshake.ID) > 0 && msg.Handshake.ID != app.a.Configure().ID {
logging.Info("agent_id reset rewrite configure file...")
app.a.Configure().SetAgentID(msg.Handshake.ID)
app.a.OnRewriteConfigure()
}