Skip to content

Commit

Permalink
Merge pull request #647 from wallyqs/js-fix
Browse files Browse the repository at this point in the history
js: Remove JS timeout which got moved to JS context
  • Loading branch information
wallyqs committed Feb 1, 2021
2 parents 5b49249 + 6a8ae59 commit 34a261e
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions nats.go
@@ -1,4 +1,4 @@
// Copyright 2012-2020 The NATS Authors
// Copyright 2012-2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand Down Expand Up @@ -54,7 +54,6 @@ const (
DefaultReconnectJitter = 100 * time.Millisecond
DefaultReconnectJitterTLS = time.Second
DefaultTimeout = 2 * time.Second
DefaultJetStreamTimeout = 2 * time.Second
DefaultPingInterval = 2 * time.Minute
DefaultMaxPingOut = 2
DefaultMaxChanLen = 64 * 1024 // 64k
Expand Down Expand Up @@ -158,7 +157,6 @@ func GetDefaultOptions() Options {
ReconnectJitter: DefaultReconnectJitter,
ReconnectJitterTLS: DefaultReconnectJitterTLS,
Timeout: DefaultTimeout,
JetStreamTimeout: DefaultJetStreamTimeout,
PingInterval: DefaultPingInterval,
MaxPingsOut: DefaultMaxPingOut,
SubChanLen: DefaultMaxChanLen,
Expand Down Expand Up @@ -313,9 +311,6 @@ type Options struct {
// Timeout sets the timeout for a Dial operation on a connection.
Timeout time.Duration

// JetStreamTimeout set the default timeout for the JetStream API
JetStreamTimeout time.Duration

// DrainTimeout sets the timeout for a Drain Operation to complete.
DrainTimeout time.Duration

Expand Down Expand Up @@ -839,14 +834,6 @@ func Timeout(t time.Duration) Option {
}
}

// JetStreamTimeout is an Option to set the timeout for access to the JetStream API
func JetStreamTimeout(t time.Duration) Option {
return func(o *Options) error {
o.JetStreamTimeout = t
return nil
}
}

// FlusherTimeout is an Option to set the write (and flush) timeout on a connection.
func FlusherTimeout(t time.Duration) Option {
return func(o *Options) error {
Expand Down

0 comments on commit 34a261e

Please sign in to comment.