diff --git a/src/rdkafka.c b/src/rdkafka.c index 21dd9cd68a..afcba06f34 100644 --- a/src/rdkafka.c +++ b/src/rdkafka.c @@ -3838,7 +3838,15 @@ rd_kafka_poll_cb (rd_kafka_t *rk, rd_kafka_q_t *rkq, rd_kafka_op_t *rko, break; default: - rd_kafka_assert(rk, !*"cant handle op type"); + /* If op has a callback set (e.g., OAUTHBEARER_REFRESH), + * call it. */ + if (rko->rko_type & RD_KAFKA_OP_CB) { + res = rd_kafka_op_call(rk, rkq, rko); + break; + } + + RD_BUG("Can't handle op type %s (0x%x)", + rd_kafka_op2str(rko->rko_type), rko->rko_type); break; }