Skip to content

Commit

Permalink
pubNub.forceDestroy should force okHttpClient executor service to sho…
Browse files Browse the repository at this point in the history
…utDown immediately. (#331)

* PubNub SDK v10.4.1 release.

---------

Co-authored-by: PubNub Release Bot <[email protected]>
  • Loading branch information
marcin-cebo and pubnub-release-bot authored Jan 24, 2025
1 parent 4f5c588 commit d40a520
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 26 deletions.
13 changes: 9 additions & 4 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: kotlin
version: 10.4.0
version: 10.4.1
schema: 1
scm: github.com/pubnub/kotlin
files:
- build/libs/pubnub-kotlin-10.4.0-all.jar
- build/libs/pubnub-kotlin-10.4.1-all.jar
sdks:
-
type: library
Expand All @@ -23,8 +23,8 @@ sdks:
-
distribution-type: library
distribution-repository: maven
package-name: pubnub-kotlin-10.4.0
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.4.0/pubnub-kotlin-10.4.0.jar
package-name: pubnub-kotlin-10.4.1
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.4.1/pubnub-kotlin-10.4.1.jar
supported-platforms:
supported-operating-systems:
Android:
Expand Down Expand Up @@ -121,6 +121,11 @@ sdks:
license-url: https://www.apache.org/licenses/LICENSE-2.0.txt
is-required: Required
changelog:
- date: 2025-01-24
version: v10.4.1
changes:
- type: bug
text: "PubNub.forceDestroy should cause okHttpClient executor service to shutDown immediately."
- date: 2025-01-21
version: v10.4.0
changes:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v10.4.1
January 24 2025

#### Fixed
- PubNub.forceDestroy should cause okHttpClient executor service to shutDown immediately.

## v10.4.0
January 21 2025

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub-kotlin</artifactId>
<version>10.4.0</version>
<version>10.4.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RELEASE_SIGNING_ENABLED=true
SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=false
GROUP=com.pubnub
VERSION_NAME=10.4.0
VERSION_NAME=10.4.1
POM_PACKAGING=jar

POM_NAME=PubNub SDK
Expand Down
16 changes: 0 additions & 16 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -659,22 +659,6 @@ proxy-from-env@^1.1.0:
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

[email protected]:
version "8.4.1"
resolved "https://registry.yarnpkg.com/pubnub/-/pubnub-8.4.1.tgz#5f6f19e84d3187dc8aee0a458bd6b05e90d43e6a"
integrity sha512-mPlwVoHJDWPasZx52UfSMiPX5TATm5A+ficSogyqDqTQ4w5EQnwxH+PJdsWc0mPnlT051jM1vIISMeM0fQ30CQ==
dependencies:
agentkeepalive "^3.5.2"
buffer "^6.0.3"
cbor-js "^0.1.0"
cbor-sync "^1.0.4"
form-data "^4.0.0"
lil-uuid "^0.1.1"
node-fetch "^2.7.0"
proxy-agent "^6.3.0"
react-native-url-polyfill "^2.0.0"
text-encoding "^0.7.0"

[email protected]:
version "8.6.0"
resolved "https://registry.yarnpkg.com/pubnub/-/pubnub-8.6.0.tgz#75524e7ed3653090652d160ce83ac089362a0379"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,19 @@ class RetrofitManager(
) {
if (client != null) {
client.dispatcher.cancelAll()

val executorService = client.dispatcher.executorService
executorService.shutdown()
if (force) {
client.connectionPool.evictAll()
val executorService = client.dispatcher.executorService
executorService.shutdown()
try {
if (!executorService.awaitTermination(100, TimeUnit.MILLISECONDS)) {
executorService.shutdownNow()
}
} catch (e: InterruptedException) {
executorService.shutdownNow()
}
}
client.connectionPool.evictAll()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class PubNubImplTest : BaseTest() {
fun getVersionAndTimeStamp() {
val version = PubNubImpl.SDK_VERSION
val timeStamp = PubNubImpl.timestamp()
assertEquals("10.4.0", version)
assertEquals("10.4.1", version)
assertTrue(timeStamp > 0)
}

Expand Down

0 comments on commit d40a520

Please sign in to comment.