From aed754abc4655c550425a63193d642b2098a37e6 Mon Sep 17 00:00:00 2001 From: Yichen Wang <18348405+Aiee@users.noreply.github.com> Date: Fri, 31 Dec 2021 12:50:48 +0800 Subject: [PATCH] Release the transport when version verification fail (#181) --- connection.go | 1 + 1 file changed, 1 insertion(+) diff --git a/connection.go b/connection.go index d3260d81..16ecac3b 100644 --- a/connection.go +++ b/connection.go @@ -76,6 +76,7 @@ func (cn *connection) verifyClientVersion() error { req := graph.NewVerifyClientVersionReq() resp, err := cn.graph.VerifyClientVersion(req) if err != nil { + cn.close() return fmt.Errorf("failed to verify client version: %s", err.Error()) } if resp.GetErrorCode() != nebula.ErrorCode_SUCCEEDED {