Skip to content

Commit 15c7dee

Browse files
committed
add sending capabilities
1 parent cbfef99 commit 15c7dee

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

websockets/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
5+
buildToolsVersion '26.0.2'
66

77
defaultConfig {
88
minSdkVersion 14

websockets/src/main/java/com/craftsman/websockets/WsImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ public void onEvent(String s, Object o) {
5858
});
5959
}
6060
}
61-
6261
@Override
6362
public void onClose(int i, String s) {
63+
//force recnnection to web socket
6464
Log.i(TAG,"Disconnected");
6565
try {
66-
connect();
66+
if(!autobahnConnection.isConnected()) connect();
6767
} catch (Exception e) {
6868
e.printStackTrace();
6969
}

0 commit comments

Comments
 (0)