diff --git a/client/service.go b/client/service.go index a48dd5e..02960d5 100644 --- a/client/service.go +++ b/client/service.go @@ -137,8 +137,8 @@ func NewService(queueSize ...int) *Service { return &Service{ state: serviceStopped, Session: session.NewMemorySession(), - MinReconnectDelay: 1 * time.Second, - MaxReconnectDelay: 32 * time.Second, + MinReconnectDelay: 50 * time.Millisecond, + MaxReconnectDelay: 10 * time.Second, ConnectTimeout: 5 * time.Second, DisconnectTimeout: 10 * time.Second, ResubscribeTimeout: 5 * time.Second, diff --git a/client/service_test.go b/client/service_test.go index 6873070..597b19c 100644 --- a/client/service_test.go +++ b/client/service_test.go @@ -235,7 +235,6 @@ func TestServiceReconnect(t *testing.T) { offline := make(chan struct{}) s := NewService() - s.MinReconnectDelay = 50 * time.Millisecond s.ConnectTimeout = 50 * time.Millisecond i := 0 @@ -364,7 +363,6 @@ func TestServiceResubscribe(t *testing.T) { offline := make(chan struct{}) s := NewService() - s.MinReconnectDelay = 50 * time.Millisecond i := 0 @@ -448,7 +446,6 @@ func TestServiceResubscribeTimeout(t *testing.T) { offline := make(chan struct{}) s := NewService() - s.MinReconnectDelay = 50 * time.Millisecond s.ResubscribeTimeout = 50 * time.Millisecond i := 0