Skip to content

Commit

Permalink
[SIG-35025] Add a nil check in snowflake driver heartbeat function (#133
Browse files Browse the repository at this point in the history
)

* Add a nil check in snowflake driver heartbeat function

* Update heartbeat.go
  • Loading branch information
rajsigma committed May 19, 2023
1 parent 63c6110 commit beef694
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func (hc *heartbeat) start() {
}

func (hc *heartbeat) stop() {
if hc.shutdownChan == nil {
return
}
hc.shutdownChan <- true
close(hc.shutdownChan)
logger.Info("heartbeat stopped")
Expand Down

0 comments on commit beef694

Please sign in to comment.