dotnet / dotnet/MQTTnet

MQTT throw MqttClientDisconnectedException exception when Publish message to Server

Open
#1,778 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
5.1k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

### Describe your question
I am using MQTTnet version 4.1.4.563 for .Net Framework 4.5.2 .
When I published message to server, my program threw exception : MQTTnet.Client.MqttClientDisconnectedException: The MQTT client is disconnected. My conection to MQTT Server is fine, and I also using variable IsConnected to check, (before sending message), it always returns true. Can you help me explain my situation?
Here is my exception.
![image](https://github.com/dotnet/MQTTnet/assets/82010847/e94bd18b-4be5-449d-9bed-2e00548305ac)

### Which project is your question related to?

- Client
- Server

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.