Skip to content

Why is there no retain(nc) in the natsLibevent_Attach() function, and then a corresponding decrement in natsLibevent_Detach()? #888

@yanyongcheng

Description

@yanyongcheng

Observed behavior

Why is there no retain(nc) in the natsLibevent_Attach function, and then a corresponding decrement in natsLibevent_Detach()?
Instead, the retain(nc) is done in natsConnection_ProcessReadEvent(). What's the purpose? and it doesn't feel very intuitive.

Expected behavior

retain(nc) in the natsLibevent_Attach function, and then a corresponding decrement in natsLibevent_Detach()

Server and client version

client:3.10.1

Host environment

No response

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions