diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..6f9625e1d Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index caa5c8d0e..f3c10840f 100644 --- a/README.md +++ b/README.md @@ -446,8 +446,9 @@ This library uses [semantic versioning](http://semver.org/). For each release, t * Create a branch for the release, named like `release-1.0.6` * Replace all references of the current version number with the new version number (check this file [README.md](./README.md) and [common.gradle](./common.gradle)) and commit the changes -* Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). Once the CHANGELOG has completed, manually change the `Unreleased` heading and link with the current version number such as `v1.0.4`. Also ensure that the `Full Changelog` link points to the new version tag instead of the `HEAD`. Commit this change. -* Add a tag and push to origin such as `git tag v1.0.4; git push origin v1.0.4` +* Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to update the [CHANGELOG](./CHANGELOG.md): `github_changelog_generator -u ably -p ably-java --header-label="# Changelog" --release-branch=release-1.0.6 --future-release=v1.0.6` +* Commit [CHANGELOG](./CHANGELOG.md) +* Add a tag and push to origin such as `git tag v1.0.6; git push origin v1.0.6` * Make a PR against `develop` * Once the PR is approved, merge it into `develop` * Fast-forward the master branch: `git checkout master && git merge --ff-only develop && git push origin master` diff --git a/android/.DS_Store b/android/.DS_Store new file mode 100644 index 000000000..d539fa41b Binary files /dev/null and b/android/.DS_Store differ diff --git a/common.gradle b/common.gradle index ed55db5ad..5691a40c9 100644 --- a/common.gradle +++ b/common.gradle @@ -3,7 +3,7 @@ repositories { } group = 'io.ably' -version = '1.0.6' +version = '1.0.8' description = """Ably java client library""" tasks.withType(Javadoc) { diff --git a/deploy/.DS_Store b/deploy/.DS_Store new file mode 100644 index 000000000..f82454409 Binary files /dev/null and b/deploy/.DS_Store differ diff --git a/gradle/.DS_Store b/gradle/.DS_Store new file mode 100644 index 000000000..7fbcbb679 Binary files /dev/null and b/gradle/.DS_Store differ diff --git a/gradle/wrapper/.DS_Store b/gradle/wrapper/.DS_Store new file mode 100644 index 000000000..d50c38da0 Binary files /dev/null and b/gradle/wrapper/.DS_Store differ diff --git a/java/.DS_Store b/java/.DS_Store new file mode 100644 index 000000000..6494192d5 Binary files /dev/null and b/java/.DS_Store differ diff --git a/lib/.DS_Store b/lib/.DS_Store new file mode 100644 index 000000000..9a874b576 Binary files /dev/null and b/lib/.DS_Store differ diff --git a/lib/src/main/java/io/ably/lib/transport/WebSocketTransport.java b/lib/src/main/java/io/ably/lib/transport/WebSocketTransport.java index 958f23bc7..ab340d145 100644 --- a/lib/src/main/java/io/ably/lib/transport/WebSocketTransport.java +++ b/lib/src/main/java/io/ably/lib/transport/WebSocketTransport.java @@ -291,7 +291,11 @@ private void checkActivity() { timer = new Timer(); } } - timer.schedule(new WsClientTimerTask(this), next - now); + try { + timer.schedule(new WsClientTimerTask(this), next - now); + } catch(IllegalStateException ise) { + Log.e(TAG, "Unexpected exception scheduling activity timer", ise); + } } else { /* Timeout has been reached. Close the connection. */ Log.e(TAG, "No activity for " + timeout + "ms, closing connection"); @@ -310,7 +314,11 @@ public WsClientTimerTask(WsClient client) { } public void run() { - client.checkActivity(); + try { + client.checkActivity(); + } catch(Throwable t) { + Log.e(TAG, "Unexpected exception in activity timer handler", t); + } } } diff --git a/lib/src/main/java/io/ably/lib/types/BaseMessage.java b/lib/src/main/java/io/ably/lib/types/BaseMessage.java index b751ce636..61295f40c 100644 --- a/lib/src/main/java/io/ably/lib/types/BaseMessage.java +++ b/lib/src/main/java/io/ably/lib/types/BaseMessage.java @@ -86,7 +86,9 @@ public void decode(ChannelOptions opts) throws MessageDecodeException { continue; case "utf-8": - try { data = new String((byte[])data, "UTF-8"); } catch(UnsupportedEncodingException e) {} + String jsonText2 = ((String)data).trim(); + data = jsonText2; + continue; case "json":