Update base.py

Our app uses `SimpleProducer` and logs lots of these warnings (from line 438):

   producer.stop() called, but producer is not async

This destructor appears to be the cause.

(Also, is it wise to do a thread join from a destructor?)
This commit is contained in:
Tom Most
2016-02-26 17:37:41 -08:00
parent 59ac7d6ca6
commit 00d527f480

View File

@@ -471,5 +471,5 @@ class Producer(object):
self.stopped = True
def __del__(self):
if not self.stopped:
if self.async and not self.stopped:
self.stop()