When receiving MQTT data from some PC clients,
After the EIdReadTimeoutException occurs, the data is all wrong.
If you look inside the procedure TTMSMQTTReaderThread.Work function, FConnection.Read (LBuffer, LRemainingLength, false)
FIdTcpClient.Socket.ReadTimeout:= 5000
This causes slow data reception to time out, and all subsequent data to go wrong during parsing.
Is there any particular reason why you set the timeout to 5 seconds?
Is there any other solution or can't we set the timeout to IdTimeoutInfinite?