Skip to content

Commit

Permalink
add infolog for when a relay sends an unexpected OK message.
Browse files Browse the repository at this point in the history
this can be indicative of either us or the relay miscalculating the event id.
  • Loading branch information
fiatjaf committed Nov 9, 2023
1 parent fda3bd2 commit 93b43ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 93b43ed

Please sign in to comment.