Skip to content

Multiple Clients with same ID - Segmentation Fault #572

Description

@QtlTobias

When creating multiple clients

  • one in thread A and one in thread B
  • with the same unique ID
  • and then receiving in thread B with mqtt_client.try_consume_message_for(&rx_msg, 1000ms);
    Causes a segmentation fault.

Yes I know that using the same unique ID twice violates the API contract.
Regardless I wanted to inform you about this issue, because there might me some deeper issue to that or at least something fragile that might cause pain points in future developments.

I use version 1.6.0
with the following flags:

-DPAHO_WITH_MQTT_C=ON
-DPAHO_BUILD_SHARED=FALSE
-DPAHO_BUILD_STATIC=TRUE
-DPAHO_WITH_SSL=TRUE

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