fired the socket closed event after the tls handshake fail