Skip to content

Bogus out of memory report on client disconnection #3253

Description

@abiliojr

If a client publishes a message using QoS=1 and disconnects before the broker can send the PUBACK, mosquitto will print something like Client auto-8F57B354-93D8-2D3B-CDF4-1340A9256762 disconnected due to out of memory. I believe this is misleading.

Though it's time dependent and might require a few retries before manifesting, it can be reproduced using the following python snippet:

import paho.mqtt.client as paho

client = paho.Client(callback_api_version=2)
client.connect('localhost')
s = client.socket()
client._send_publish(1, b'hello', b'world', 1)
s.close()
client.loop_stop()

On my computer it happens about 90% of the time (there's no way to guarantee that the python script will disconnect before the broker sends the PUBACK).

Found it in 2.0.20 and the develop branch (as a side note, I'm struggling to build latest develop).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: mosquitto-brokerStatus: CompletedNothing further to be done with this issue, it can be closed by the requestor or committer.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions