Skip to content

Adding reason_code during disconnect #95

@vicrem

Description

@vicrem

Hello, first I want to thank you for making it easy to use gmqtt with FastAPI!
Second is more of a wish than issue. I need a way to send reason_code during shutdown, so if possible, can you change to this?

async def mqtt_shutdown(self, reason_code=0) -> None:
    """Final disconnection for MQTT client, for lifespan shutdown."""
    await self.client.disconnect(reason_code)

Many thx
//Victor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions