Remove shutdown listener when stopping the rabbitmq consumer
authorChristos KK Loverdos <loverdos@gmail.com>
Fri, 25 May 2012 09:48:46 +0000 (12:48 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Fri, 25 May 2012 09:48:46 +0000 (12:48 +0300)
src/main/scala/gr/grnet/aquarium/connector/rabbitmq/RabbitMQConsumer.scala

index 2b10bf1..ad3ef4f 100644 (file)
@@ -251,6 +251,7 @@ class RabbitMQConsumer(val conf: RabbitMQConsumerConf,
 
   def safeStop() = {
     _state.set(ShutdownSequence)
+    safeUnit(_channel.removeShutdownListener(RabbitMQShutdownListener))
     safeUnit(_channel.close())
     safeUnit(_connection.close())
     _state.set(Shutdown)