tls: emit `clientError` on early socket close

fix #6903