Subject: | AnyEvent::SMTP::Server does not stop listening on stop() |
Date: | Tue, 9 Apr 2013 13:06:05 -0700 |
To: | bug-AnyEvent-SMTP [...] rt.cpan.org |
From: | David McGuire <david.mcguire [...] sendgrid.com> |
Mons,
When upgrading to the newest version of the AnyEvent::SMTP library (v0.08),
several of my tests started failing, because they rely on the Server
implementation being restarted to be sure lingering connections are
dropped. However, the following sequence no longer works correctly:
$server->stop();
$server->start();
The error that I get is from the bind call inside of start() telling me
that the port is already in use; this can only mean that the stop() call
never causes the server to stop listening.
I've attached a test case to demonstrate that the server won't stop
listening within 5 seconds of a stop() call being made (and the server
instance being undef'd). Now, the documentation for stop() doesn't
explicitly say that it will stop listening, but I'm assuming that's what
"... and shutdown server" entails, and that's also consistent with how
previous versions have behaved. For these reasons, I hope you'll consider
this a defect.
Thanks.
--
Dave McGuire
Sr. SW Engineer
Dev Tools / Compliance
SendGrid Anaheim <http://sendgrid.com>
Message body is not shown because sender requested not to inline it.