Skip to content

Commit 7f933cf

Browse files
authored
fix: Resolve the issue of reusing closed connections. (#96)
1 parent 2c53f68 commit 7f933cf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## 1.8.1
44

5+
### 🐞 Bug Fixes
6+
- Resolve the issue of reusing closed connections.
7+
58
### 🔨 Changed
69
- Upgrade grafana-plugin-sdk-go to version v0.258.0.
710
- Upgrade gosnowflake to version v1.12.0.

pkg/check_health.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (td *SnowflakeDatasource) CheckHealth(ctx context.Context, req *backend.Che
2020
return result, nil
2121
}
2222
// Use the existing db field instead of opening a new connection
23-
if td.db == nil {
23+
if td.db == nil || td.db.Ping() != nil {
2424
var err error
2525
td.db, err = sql.Open("snowflake", connectionString)
2626
if err != nil {

0 commit comments

Comments
 (0)