Skip to content

Problem: zloop is using reader callback after zloop_reader_end #1634

@piskorzj

Description

@piskorzj

I've recently hit a problem when I have zloop with timer and reader. And inside timer I'm doing zloop_reader_end. All works well until both conditions are met in one zloop go - timer is expired and data is available on reader. In timer after zloop_reader_end I'm also doing zsock_destroy and other cleanup stuff. Thus callback called for socket contains invalid data - I don't want it to be called after doing zloop_reader_end cause it breaks whole loop logic.

Any suggestions how to avoid this or zloop implementation needs to be changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions