Skip to content

Commit 8f423fb

Browse files
PubNub SDK v6.0.1 release.
1 parent 6cc069a commit 8f423fb

File tree

8 files changed

+29
-13
lines changed

8 files changed

+29
-13
lines changed

.pubnub.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: kotlin
2-
version: 6.0.0
2+
version: 6.0.1
33
schema: 1
44
scm: github.com/pubnub/kotlin
55
files:
6-
- build/libs/pubnub-kotlin-6.0.0-all.jar
6+
- build/libs/pubnub-kotlin-6.0.1-all.jar
77
sdks:
88
-
99
type: library
@@ -233,6 +233,13 @@ sdks:
233233
license-url: https://github.com/stleary/JSON-java/blob/20210307/LICENSE
234234
is-required: Required
235235
changelog:
236+
-
237+
version: v6.0.1
238+
date: 2021-05-25
239+
changes:
240+
-
241+
type: bug
242+
text: "There was missing PNAcknowledgmentCategory status callback after unsubscribe operation. Problem was caused by ungaught SSLException. This release provides a fix for the issue."
236243
-
237244
version: v6.0.0
238245
date: 2021-05-12

CHANGELOG.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
## [v6.0.0](https://github.com/pubnub/kotlin/releases/tag/v6.0.0)
2-
May 12 2021
1+
## [v6.0.1](https://github.com/pubnub/kotlin/releases/tag/v6.0.1)
2+
May 25 2021
33

4-
[Full Changelog](https://github.com/pubnub/kotlin/compare/v5.1.3...v6.0.0)
4+
[Full Changelog](https://github.com/pubnub/kotlin/compare/v6.0.0...v6.0.1)
55

6-
- Random initialisation vector used when encryption enabled is now default behaviour.
7-
- Bumping versions of used dependencies.
8-
- There were some non daemon threads running in background preventing VM from exiting. Now they are daemon threads.
6+
- There was missing PNAcknowledgmentCategory status callback after unsubscribe operation. Problem was caused by ungaught SSLException. This release provides a fix for the issue.
97

108

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
2323
<dependency>
2424
<groupId>com.pubnub</groupId>
2525
<artifactId>pubnub-gson</artifactId>
26-
<version>6.0.0</version>
26+
<version>6.0.1</version>
2727
</dependency>
2828
```
2929

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313
}
1414

1515
group = 'com.pubnub'
16-
version = '6.0.0'
16+
version = '6.0.1'
1717

1818
repositories {
1919
mavenCentral()

src/integrationTest/kotlin/com/pubnub/api/integration/SubscribeIntegrationTests.kt

+9-1
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,18 @@ class SubscribeIntegrationTests : BaseIntegrationTest() {
107107
@Test
108108
fun testUnsubscribeFromAllChannels() {
109109
val success = AtomicBoolean()
110+
val randomChannel = randomChannel()
111+
112+
pubnub.subscribeToBlocking(randomChannel)
110113

111114
pubnub.addListener(object : SubscribeCallback() {
112115
override fun status(pubnub: PubNub, pnStatus: PNStatus) {
113-
success.set(pubnub.getSubscribedChannels().isEmpty())
116+
if (pnStatus.category == PNStatusCategory.PNAcknowledgmentCategory &&
117+
pnStatus.affectedChannels.contains(randomChannel) &&
118+
pnStatus.operation == PNOperationType.PNUnsubscribeOperation
119+
) {
120+
success.set(pubnub.getSubscribedChannels().isEmpty())
121+
}
114122
}
115123
})
116124

src/main/kotlin/com/pubnub/api/PubNub.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class PubNub(val configuration: PNConfiguration) {
7979

8080
private companion object Constants {
8181
private const val TIMESTAMP_DIVIDER = 1000
82-
private const val SDK_VERSION = "6.0.0"
82+
private const val SDK_VERSION = "6.0.1"
8383
private const val MAX_SEQUENCE = 65535
8484
}
8585

src/main/kotlin/com/pubnub/okhttp3/PNCall.kt

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import okhttp3.Call
44
import okhttp3.Connection
55
import org.slf4j.LoggerFactory
66
import java.net.SocketException
7+
import javax.net.ssl.SSLException
78
import kotlin.reflect.full.declaredMemberFunctions
89
import kotlin.reflect.jvm.isAccessible
910

@@ -17,6 +18,8 @@ internal class PNCall(
1718
realCall.getConnection()?.socket()?.shutdownInput()
1819
} catch (se: SocketException) {
1920
log.warn("Caught exception when canceling call", se)
21+
} catch (_: SSLException) {
22+
// we have to swallow this exception, otherwise cancel will break status delivery
2023
} catch (uoe: UnsupportedOperationException) {
2124
// silent catch
2225
}

src/test/kotlin/com/pubnub/api/legacy/PubNubTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class PubNubTest : BaseTest() {
6767
fun getVersionAndTimeStamp() {
6868
val version = pubnub.version
6969
val timeStamp = pubnub.timestamp()
70-
assertEquals("6.0.0", version)
70+
assertEquals("6.0.1", version)
7171
assertTrue(timeStamp > 0)
7272
}
7373
}

0 commit comments

Comments
 (0)