clientv3/concurrency/session.go
func (s *Session) Close() error {
	s.Orphan()
	// if revoke takes longer than the ttl, lease is expired anyway
	ctx, cancel := context.WithTimeout(s.opts.ctx, time.Duration(s.opts.ttl)*time.Second)
	_, err := s.client.Revoke(ctx, s.id)
	cancel()
	return err
}
func (s *Session) Close() error {
	s.Orphan()
	// if revoke takes longer than the ttl, lease is expired anyway
	ctx, cancel := context.WithTimeout(s.opts.ctx, time.Duration(s.opts.ttl)*time.Second)
	_, err := s.client.Revoke(ctx, s.id)
	cancel()
	return err
}
func ( s * Session ) Close ( ) error { s . Orphan ( ) // if revoke takes longer than the ttl, lease is expired anyway ctx , cancel := context . WithTimeout ( s . opts . ctx , time . Duration ( s . opts . ttl ) * time . Second ) _ , err := s . client . Revoke ( ctx , s . id ) cancel ( ) return err }
// Close orphans the session and revokes the session lease.
Close orphans the session and revokes the session lease .