tls socket missing error listener

This fixes #585