Skip to content

streamSubscribe panics on NewConsumer failure; unsynced stats counters #90

@miotte

Description

@miotte

Two bugs in the amqp091 stream path:

  • streamSubscribe ignores the error from StreamConnection.NewConsumer and then unconditionally calls consumer.Close(). When the consumer fails to construct it returns (nil, err), and the subsequent Close() panics the goroutine. The error should be surfaced as *pb.Error and the increment/Close path skipped.
  • Stats() and connectionCleaner read produced, consumed, and ActiveStreams as plain int64s, but writers use atomic.AddInt64. The reads should use atomic.LoadInt64 to remove the data race.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggoPull requests that update go code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions