Skip to content

Commit

Permalink
kgo: allow HookBrokerRead and HookBrokerE2E to both be called
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Jul 8, 2023
1 parent 875761a commit e224e90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/kgo/broker.go
Expand Up @@ -1217,10 +1217,10 @@ func (cxn *brokerCxn) readResponse(
bytesRead, buf, readWait, timeToRead, readErr := cxn.readConn(ctx, timeout, readEnqueue)

cxn.cl.cfg.hooks.each(func(h Hook) {
switch h := h.(type) {
case HookBrokerRead:
if h, ok := h.(HookBrokerRead); ok {
h.OnBrokerRead(cxn.b.meta, key, bytesRead, readWait, timeToRead, readErr)
case HookBrokerE2E:
}
if h, ok := h.(HookBrokerE2E); ok {
h.OnBrokerE2E(cxn.b.meta, key, BrokerE2E{
BytesWritten: bytesWritten,
BytesRead: bytesRead,
Expand Down

0 comments on commit e224e90

Please sign in to comment.