substack/node-smtp-protocol — pull request #29 by emersion (2014-08-17 20:11:10+00:00)
Title: Unregister encrypted stream when upgrading to TLS

`smtp-protocol` tries to parse encrypted data from the stream after upgrading to TLS.

This patch creates a new parser after upgrading and unregisters the first one, previously listening on the unencrypted stream and now receiving encrypted data.