slimta / python-slimta

Python libraries to send, receive, and queue email.
https://slimta.org/
MIT License
171 stars 43 forks source link

Fix pool parameter boolean condition for EdgeServer #95

Closed toxinu closed 8 years ago

toxinu commented 8 years ago

If I set a gevent.pool.Pool as a pool (with no size) for an SmtpEdge for example, this boolean condition will always return 'default' instead of using my Pool.

This is because of Pool.__len__ which return how many greenlets this Pool is tracking.

icgood commented 8 years ago

Good catch. Can you change this to:

spawn = 'default' if pool is None else pool

and then I will merge. Thanks!

toxinu commented 8 years ago

Updated and history rewritten to be cleaner.

icgood commented 8 years ago

Merged, thanks @socketubs