diff --git a/pool/pool.go b/pool/pool.go index 336de1a..a428e21 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -254,6 +254,8 @@ type innerPool struct { clientPacks []*clientPack } +const DefaultSessionTokenExpirationDuration = 100 // in blocks + func newPool(ctx context.Context, options *BuilderOptions) (Pool, error) { cache, err := NewCache() if err != nil { @@ -301,6 +303,10 @@ func newPool(ctx context.Context, options *BuilderOptions) (Pool, error) { return nil, fmt.Errorf("at least one node must be healthy") } + if options.SessionExpirationDuration == 0 { + options.SessionExpirationDuration = DefaultSessionTokenExpirationDuration + } + ctx, cancel := context.WithCancel(ctx) pool := &pool{ innerPools: inner,