Skip to content

Commit 1f96d32

Browse files
committed
Merge branch 'hotfix/WssFix'
2 parents 2b756ba + e421d90 commit 1f96d32

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-android-extensions'
44

55
android {
6-
compileSdkVersion 26
7-
buildToolsVersion "26.0.2"
6+
compileSdkVersion 27
7+
buildToolsVersion "27.0.3"
88
defaultConfig {
99
applicationId "com.smartarmenia.websocketclient"
1010
minSdkVersion 16
11-
targetSdkVersion 26
11+
targetSdkVersion 27
1212
versionCode 1
1313
versionName "1.0"
1414
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.1.51'
4+
ext.kotlin_version = '1.2.30'
55
repositories {
66
google()
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.0'
10+
classpath 'com.android.tools.build:gradle:3.0.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
1313
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

dotnetcoresignalrclient/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 26
6-
buildToolsVersion "26.0.2"
5+
compileSdkVersion 27
6+
buildToolsVersion "27.0.3"
77

88

99
defaultConfig {
1010
minSdkVersion 16
11-
targetSdkVersion 26
11+
targetSdkVersion 27
1212
versionCode 1
1313
versionName "1.00 24sep2017"
1414
}

dotnetcoresignalrclientjava/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 26
5-
buildToolsVersion "26.0.2"
4+
compileSdkVersion 27
5+
buildToolsVersion "27.0.3"
66

77

88
defaultConfig {
99
minSdkVersion 16
10-
targetSdkVersion 26
10+
targetSdkVersion 27
1111
versionCode 10
1212
versionName "1.09"
1313
}

dotnetcoresignalrclientjava/src/main/java/com/smartarmenia/dotnetcoresignalrclientjava/WebSocketHubConnection.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import java.util.Map;
2525
import java.util.UUID;
2626

27+
import javax.net.ssl.SSLSocketFactory;
28+
2729
public class WebSocketHubConnection implements HubConnection {
2830
private static String SPECIAL_SYMBOL = "\u001E";
2931
private static String TAG = "WebSockets";
@@ -161,10 +163,13 @@ public void onError(Exception ex) {
161163
error(ex);
162164
}
163165
};
166+
167+
if (parsedUri.getScheme().equals("https")) {
168+
client.setSocket(SSLSocketFactory.getDefault().createSocket());
169+
}
164170
} catch (Exception e) {
165171
error(e);
166172
}
167-
168173
Log.i(TAG, "Connecting...");
169174
client.connect();
170175
}

0 commit comments

Comments
 (0)