File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,7 @@ func getCSIConnection() (connection.CSIConnection, error) {
6767 return csiConn , nil
6868}
6969
70- func chekcHealth (w http.ResponseWriter , req * http.Request ) {
71-
70+ func checkHealth (w http.ResponseWriter , req * http.Request ) {
7271 glog .Infof ("Request: %s from: %s\n " , req .URL .Path , req .RemoteAddr )
7372 csiConn , err := getCSIConnection ()
7473 if err != nil {
@@ -77,6 +76,7 @@ func chekcHealth(w http.ResponseWriter, req *http.Request) {
7776 glog .Infof ("Failed to get connection to CSI with error: %v." , err )
7877 return
7978 }
79+ defer csiConn .Close ()
8080 ctx , cancel := context .WithTimeout (context .Background (), * connectionTimeout )
8181 defer cancel ()
8282 if err := runProbe (ctx , csiConn ); err != nil {
You can’t perform that action at this time.
0 commit comments