Skip to content

Commit

Permalink
add max reconnects
Browse files Browse the repository at this point in the history
  • Loading branch information
ajithnn committed Jun 25, 2020
1 parent 26c693e commit 1fcca8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocols/sub/pubnub.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ func pubnubConnect(cfg pubnubConfig) (jmsg.RawPubnubClient, error) {
config := pubnub.NewConfig()
config.SubscribeKey = cfg.SubscribeKey
config.PublishKey = cfg.PublishKey
config.SubscribeRequestTimeout = 30
config.MaximumReconnectionRetries = 2

if cfg.SecretKey != "" {
config.SecretKey = cfg.SecretKey
}
Expand Down

0 comments on commit 1fcca8a

Please sign in to comment.