Hi, the code in clients/session.go show as below, you create a "retained" variable, set the QoS and topic, but I think you need do something more with this "retained" variable, am I right?
func (s session) SignalPublish(pkt mqttp.Publish) error {
// [MQTT-3.3.1.3]
if pkt.Retain() {
if err := s.messenger.Retain(pkt); err != nil {
s.log.Error("Error retaining message", zap.String("clientId", s.id), zap.Error(err))
}
Hi, the code in clients/session.go show as below, you create a "retained" variable, set the QoS and topic, but I think you need do something more with this "retained" variable, am I right?
func (s session) SignalPublish(pkt mqttp.Publish) error { // [MQTT-3.3.1.3] if pkt.Retain() { if err := s.messenger.Retain(pkt); err != nil { s.log.Error("Error retaining message", zap.String("clientId", s.id), zap.Error(err)) }
}