handle ssl_closed (like tcp_closed) in ts_client