tls: fix handling of failed accepts