aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--build.gradle4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java2
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java14
4 files changed, 15 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99054533..db4f687b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
###Changelog
+####Version 0.8.4
+* bug fixes
+
####Version 0.8.3
* increased UI performance
* fixed rotation bugs
diff --git a/build.gradle b/build.gradle
index 84a79d07..32ea3546 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,8 +46,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
- versionCode 35
- versionName "0.8.3"
+ versionCode 36
+ versionName "0.8.4"
}
compileOptions {
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index b9772bd7..22507483 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -383,7 +383,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
if (this.mAccount.getStatus() == Account.State.ONLINE
&& !this.mFetchingAvatar) {
this.mStats.setVisibility(View.VISIBLE);
- this.mSessionEst.setText(UIHelper.readableTimeDifference(
+ this.mSessionEst.setText(UIHelper.readableTimeDifferenceFull(
getApplicationContext(), this.mAccount.getXmppConnection()
.getLastSessionEstablished()));
Features features = this.mAccount.getXmppConnection().getFeatures();
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 9148aa72..9e6b8baf 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -21,6 +21,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.net.IDN;
+import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
@@ -574,12 +575,15 @@ public class XmppConnection implements Runnable {
final HostnameVerifier verifier = this.mXmppConnectionService.getMemorizingTrustManager().wrapHostnameVerifier(new StrictHostnameVerifier());
- if (socket == null) {
- throw new IOException("socket was null");
+ if (socket == null || socket.isClosed()) {
+ throw new IOException("socket null or closed");
}
- final SSLSocket sslSocket = (SSLSocket) factory.createSocket(socket,
- socket.getInetAddress().getHostAddress(), socket.getPort(),
- true);
+ final InetAddress address = socket.getInetAddress();
+ if (address == null) {
+ throw new IOException("socket address was null");
+ }
+
+ final SSLSocket sslSocket = (SSLSocket) factory.createSocket(socket,address.getHostAddress(), socket.getPort(),true);
// Support all protocols except legacy SSL.
// The min SDK version prevents us having to worry about SSLv2. In