Should not throw an exception when disposing a consumer, reader or producer
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f5e33f2..be9ea7d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [Unreleased]
+
+### Fixed
+
+- Do not throw exceptions when disposing consumers, readers or producers
+
## [0.10.0] - 2020-12-16
### Added
diff --git a/src/DotPulsar/Internal/NotReadyChannel.cs b/src/DotPulsar/Internal/NotReadyChannel.cs
index 60f0cbf..5590138 100644
--- a/src/DotPulsar/Internal/NotReadyChannel.cs
+++ b/src/DotPulsar/Internal/NotReadyChannel.cs
@@ -27,6 +27,9 @@
public ValueTask DisposeAsync()
=> new ValueTask();
+ public ValueTask ClosedByClient(CancellationToken cancellationToken)
+ => new ValueTask();
+
public ValueTask<Message> Receive(CancellationToken cancellationToken = default)
=> throw GetException();
@@ -51,9 +54,6 @@
public Task<CommandGetLastMessageIdResponse> Send(CommandGetLastMessageId command, CancellationToken cancellationToken)
=> throw GetException();
- public ValueTask ClosedByClient(CancellationToken cancellationToken)
- => throw GetException();
-
private static Exception GetException()
=> new ChannelNotReadyException();
}