Skip to content

Commit

Permalink
Implement driver.Validator interface (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
trongbq committed Mar 2, 2021
1 parent 7b629a9 commit 3326742
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions connection.go
Expand Up @@ -642,3 +642,9 @@ func (mc *mysqlConn) ResetSession(ctx context.Context) error {
mc.reset = true
return nil
}

// IsValid implements driver.Validator interface
// (From Go 1.15)
func (mc *mysqlConn) IsValid() bool {
return !mc.closed.IsSet()
}

0 comments on commit 3326742

Please sign in to comment.