From c557252f4e6f9cf1b473a309f2be62803f9169ea Mon Sep 17 00:00:00 2001 From: Aiee <18348405+Aiee@users.noreply.github.com> Date: Fri, 31 Dec 2021 12:46:45 +0800 Subject: [PATCH] Release the transport when version verification fail --- 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 {