Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
Close client before session...
Browse files Browse the repository at this point in the history
... avoids the problem of session.Close() blocking and causing failures.
  • Loading branch information
kshlm committed Apr 12, 2017
1 parent 2620948 commit 09ceb28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ func New() *GDStore {

// Close closes the store connections
func (s *GDStore) Close() {
if e := s.Session.Close(); e != nil {
log.WithError(e).Warn("failed to close etcd session")
}
if e := s.Client.Close(); e != nil {
log.WithError(e).Warn("failed to close etcd client connection")
}
if e := s.Session.Close(); e != nil {
log.WithError(e).Warn("failed to close etcd session")
}
}

0 comments on commit 09ceb28

Please sign in to comment.