Skip to content

Commit 86a20a2

Browse files
author
Daniel Rees
committed
Prepare 0.2.5
1 parent 2fd3720 commit 86a20a2

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ repositories {
6565
and then add the library. See [releases](https://github.com/dsrees/JavaPhoenixClient/releases) for the latest version
6666
```$xslt
6767
dependencies {
68-
implementation 'com.github.dsrees:JavaPhoenixClient:0.2.4'
68+
implementation 'com.github.dsrees:JavaPhoenixClient:0.2.5'
6969
}
7070
```
7171

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group 'com.github.dsrees'
12-
version '0.2.4'
12+
version '0.2.5'
1313

1414
sourceCompatibility = 1.8
1515

src/main/kotlin/org/phoenixframework/Transport.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ import okhttp3.Request
2727
import okhttp3.Response
2828
import okhttp3.WebSocket
2929
import okhttp3.WebSocketListener
30-
import java.io.EOFException
31-
import java.net.SocketException
30+
import java.io.IOException
3231
import java.net.URL
33-
import javax.net.ssl.SSLException
3432

3533
/**
3634
* Interface that defines different types of Transport layers. A default {@link WebSocketTransport}
@@ -136,12 +134,8 @@ class WebSocketTransport(
136134
this.onError?.invoke(t, response)
137135

138136
// Check if the socket was closed for some recoverable reason
139-
if (t is SocketException) {
140-
this.onClosed(webSocket, WS_CLOSE_SOCKET_EXCEPTION, "SocketException")
141-
} else if (t is SSLException) {
142-
this.onClosed(webSocket, WS_CLOSE_SSL_EXCEPTION, "SSLException")
143-
} else if (t is EOFException) {
144-
this.onClosed(webSocket, WS_CLOSE_EOF_EXCEPTION, "EOFException")
137+
when (t) {
138+
is IOException -> this.onClosed(webSocket, WS_CLOSE_SOCKET_EXCEPTION, "IOException")
145139
}
146140
}
147141

0 commit comments

Comments
 (0)