add infolog for when a relay sends an unexpected OK message.

this can be indicative of either us or the relay miscalculating the event id.
This commit is contained in:
fiatjaf 2023-11-08 22:22:29 -03:00
parent fda3bd2acb
commit 93b43ed426
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -307,6 +307,8 @@ func (r *Relay) Connect(ctx context.Context) error {
case *OKEnvelope:
if okCallback, exist := r.okCallbacks.Load(env.EventID); exist {
okCallback(env.OK, env.Reason)
} else {
InfoLogger.Printf("{%s} got an unexpected OK message for event %s", r.URL, env.EventID)
}
}
}