Skip to content

Commit

Permalink
Send previously stored region when subscribing (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleewho authored Mar 17, 2022
1 parent fda727a commit 5f67945
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
version: v7.0.1
version: v7.0.2
changelog:
- date: 2022-03-17
version: v7.0.2
changes:
- type: bug
text: "Send region on subscribe calls."
- type: bug
text: "Close idle connections to free up goroutines when closing PubNub."
- date: 2022-02-08
version: v7.0.1
changes:
Expand Down Expand Up @@ -701,7 +708,7 @@ sdks:
distribution-type: package
distribution-repository: GitHub
package-name: Go
location: https://github.com/pubnub/go/releases/tag/v7.0.1
location: https://github.com/pubnub/go/releases/tag/v7.0.2
requires:
-
name: "Go"
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v7.0.2
March 17 2022

#### Fixed
- Send region on subscribe calls.
- Close idle connections to free up goroutines when closing PubNub.

## v7.0.1
February 08 2022

Expand Down
2 changes: 1 addition & 1 deletion pubnub.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// Default constants
const (
// Version :the version of the SDK
Version = "7.0.1"
Version = "7.0.2"
// MaxSequence for publish messages
MaxSequence = 65535
)
Expand Down
2 changes: 2 additions & 0 deletions subscription_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,15 @@ func (m *SubscriptionManager) startSubscribeLoop() {
m.Lock()
tt := m.timetoken
ctx := m.ctx
tr := m.region
m.Unlock()

opts := &subscribeOpts{
pubnub: m.pubnub,
Channels: combinedChannels,
ChannelGroups: combinedGroups,
Timetoken: tt,
Region: strconv.Itoa(int(tr)),
Heartbeat: m.pubnub.Config.PresenceTimeout,
FilterExpression: m.pubnub.Config.FilterExpression,
ctx: ctx,
Expand Down

0 comments on commit 5f67945

Please sign in to comment.