Skip to content

[TD-04] .ok() silently swallows ~16 errors in listeners.rs event-pump hot loop #253

@intendednull

Description

@intendednull

Commit: 2f26d91 · Finding: TD-04

Problem

crates/client/src/listeners.rs lines 91, 106, 166, 169, 216, 289, 311, 343, 361, 375, 446, 484, 490, 505, 517, 536 each use trailing .ok(); to silently drop broker do_send, topic broadcast, and event-publish failures. When event_broker.do_send(Publish(...)) returns Err (broker stopped), the listener keeps running without record. Same for topic.broadcast(bytes) failures at 311/446/490.

If the broker dies, every subsequent event is silently lost until restart.

Fix

Introduce a helper fn warn_if_err<T, E: Debug>(r: Result<T, E>, context: &'static str) that tracing::warn!(?e, context) on Err, and replace .ok(); with it.

Obvious fix — will be auto-PR'd.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions