Skip to content

Commit

Permalink
Update MqttServer.cs (#1858)
Browse files Browse the repository at this point in the history
* Update MqttServer.cs

clientID is null => RetainedMessageChangedEventArgs ctor throw new ArgumentNullException(nameof(clientId)

* Update ReleaseNotes.md

---------

Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>
  • Loading branch information
kimdiego2098 and chkr1011 authored Nov 1, 2023
1 parent 6fdee9e commit e4f605f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* [Client] Fixed wrong TLS options handling (#1830).
* [Client] Fixed NullReferenceExeption when performing a Ping when the client is not connected (#1831).
* [Server] Fixed not working _UpdateRetainedMessageAsync_ public api (#1858, thanks to @kimdiego2098)
4 changes: 2 additions & 2 deletions Source/MQTTnet/Server/MqttServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public Task UpdateRetainedMessageAsync(MqttApplicationMessage retainedMessage)
ThrowIfDisposed();
ThrowIfNotStarted();

return _retainedMessagesManager?.UpdateMessage(null, retainedMessage);
return _retainedMessagesManager?.UpdateMessage(string.Empty, retainedMessage);
}

protected override void Dispose(bool disposing)
Expand Down Expand Up @@ -405,4 +405,4 @@ void ThrowIfStarted()
}
}
}
}
}

0 comments on commit e4f605f

Please sign in to comment.