fix loadtest p2p preflight replay
This commit is contained in:
@@ -216,8 +216,11 @@ type p2pResponse struct {
|
||||
|
||||
func (a *apiClient) ensureP2P(ctx context.Context, source, target AccountRecord) (*p2pResponse, error) {
|
||||
var result p2pResponse
|
||||
// EnsureP2P is itself idempotent and must execute on every preflight so it
|
||||
// can repair subscriptions and refresh a loaded topic. A stable HTTP
|
||||
// idempotency key would replay an old response and skip that repair.
|
||||
err := a.do(ctx, http.MethodPost, "/v1/im/conversations/p2p", source.Token,
|
||||
fmt.Sprintf("loadtest-p2p-%s-%04d", source.Machine, source.Index),
|
||||
"",
|
||||
map[string]any{"peer_user_id": target.UserID}, &result)
|
||||
return &result, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user