Skip to content

Commit

Permalink
fix: add pool ping (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkbeh authored Dec 10, 2024
1 parent dbede28 commit 53dba58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pool.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package clickhouse

import (
"context"
"crypto/tls"
"embed"
"log/slog"
Expand Down Expand Up @@ -51,6 +52,10 @@ func NewPool(opts ...Option) (*Pool, error) {
return nil, err
}

if err := conn.Ping(context.Background()); err != nil {
return nil, err
}

p.Conn = conn
p.exposeMetrics()

Expand Down

0 comments on commit 53dba58

Please # to comment.