Skip to content

Commit

Permalink
reduced default reconnect delay
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Sep 14, 2018
1 parent 1b0c077 commit 4480065
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions client/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -364,7 +363,6 @@ func TestServiceResubscribe(t *testing.T) {
offline := make(chan struct{})

s := NewService()
s.MinReconnectDelay = 50 * time.Millisecond

i := 0

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4480065

Please sign in to comment.