[client] Fix state dump panic (#3519)

This commit is contained in:
Viktor Liu 2025-03-16 15:13:04 +01:00 committed by GitHub
parent 6f82e96d6a
commit 0ef476b014
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,6 +140,7 @@ func NewConn(engineCtx context.Context, config ConnConfig, statusRecorder *Statu
statusRelay: NewAtomicConnStatus(), statusRelay: NewAtomicConnStatus(),
statusICE: NewAtomicConnStatus(), statusICE: NewAtomicConnStatus(),
semaphore: semaphore, semaphore: semaphore,
dumpState: newStateDump(connLog),
} }
ctrl := isController(config) ctrl := isController(config)
@ -163,7 +164,6 @@ func NewConn(engineCtx context.Context, config ConnConfig, statusRecorder *Statu
go conn.handshaker.Listen() go conn.handshaker.Listen()
conn.dumpState = newStateDump(connLog)
go conn.dumpState.Start(ctx) go conn.dumpState.Start(ctx)
return conn, nil return conn, nil
} }