diff options
| -rw-r--r-- | qpid/dotnet/Qpid.Client/Client/AMQConnection.cs | 12 | ||||
| -rw-r--r-- | qpid/dotnet/Qpid.Client/Client/AmqChannel.cs | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs b/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs index c620412cab..1da46f19fd 100644 --- a/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs +++ b/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs @@ -386,6 +386,7 @@ namespace Qpid.Client public void Start() { CheckNotClosed(); + if (!_started) { foreach (DictionaryEntry lde in _sessions) @@ -400,7 +401,16 @@ namespace Qpid.Client public void Stop() { CheckNotClosed(); - throw new NotImplementedException(); + + if (_started) + { + foreach (DictionaryEntry lde in _sessions) + { + AmqChannel s = (AmqChannel) lde.Value; + s.Stop(); + } + _started = false; + } } public IConnectionListener ConnectionListener diff --git a/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs b/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs index ab598b4b27..528fa96924 100644 --- a/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs +++ b/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs @@ -608,6 +608,14 @@ namespace Qpid.Client dispatcherThread.Start(); } + internal void Stop() + { + if (_dispatcher != null) + { + _dispatcher.StopDispatcher(); + } + } + internal void RegisterConsumer(string consumerTag, IMessageConsumer consumer) { _consumers[consumerTag] = consumer; |
