[Mailman-Developers] [Patch] SMTPDirect.py wrongly closing the connection

Barry A. Warsaw barry@zope.com
Thu, 13 Dec 2001 08:20:06 -0500


    MM> I'm not 100% sure it was meant to work that way, it looked
    MM> like the code meant to send all the deliveries in one
    MM> connection, which is why it didn't say helo in the second
    MM> batch.  So, I've removed the part that closes the connection
    MM> after the first chunk is out.

    | Barry, was this right?
    | (I didn't check if it breaks the threaded code path)

    MM> PS: Don't make fun of me for sticking a '1' in there, I don't
    MM> really claim to know python, and the parser was getting upset
    MM> if I commented out conn.quit, or that plus the finally: I was
    MM> watching Buffy on my tivo before all this happened, and I'd
    MM> like to see the end of the episode :-) (see, just Like Niguel,
    MM> I have a worthy excuse :-D)

Actually using pass instead of 1 would be the Pythonically correct
thing to do (pass is essentially a noop).

I /think/ changing conn.quit() to conn.close() is the right change,
but I'm not 100% sure and I don't have time to test it right now.  Can
you give it a try and see if that works for you?

-Barry