zendframework/zf2 — pull request #3645 by bboer (2013-02-01 08:34:46+00:00)
Title: Exception on destructing the SMTP Transport instance

When the SMTP destructs the socket gets closed automatically to free up resources which is good, hoewever when the SMTP Transport desctructs it also calls the disconnect on the SMTP Protocol which is in the middle of destruction and does not have a valid socket anymore. At that moment the sess is still set to true resulting in an Exception on destruction. Implementint / overriding the _disconnect from the SMTP protocol makes sure quit gets issued as well. Quit in itself already checks if the session is still there and makes sure the session gets set to false after quitting.