File tree Expand file tree Collapse file tree 2 files changed +0
-7
lines changed
main/kotlin/org/phoenixframework
test/kotlin/org/phoenixframework Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,6 @@ class WebSocketTransport(
135135 this .readyState = Transport .ReadyState .CLOSED
136136 this .onError?.invoke(t, response)
137137
138- // Do not attempt to recover if the initial connection was refused
139- if (t is ConnectException ) return
140-
141138 // Check if the socket was closed for some recoverable reason
142139 if (t is SocketException ) {
143140 this .onClosed(webSocket, WS_CLOSE_SOCKET_EXCEPTION , " Socket Exception" )
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import com.google.common.truth.Truth.assertThat
44import com.nhaarman.mockitokotlin2.any
55import com.nhaarman.mockitokotlin2.mock
66import com.nhaarman.mockitokotlin2.verify
7- import com.nhaarman.mockitokotlin2.verifyZeroInteractions
87import com.nhaarman.mockitokotlin2.whenever
98import okhttp3.OkHttpClient
109import okhttp3.Response
@@ -74,8 +73,6 @@ class WebSocketTransportTest {
7473 @Test
7574 fun `onFailure sets ready state to CLOSED and invokes onError callback` () {
7675 val mockClosure = mock< (Throwable , Response ? ) -> Unit > ()
77- val mockOnClose = mock< (Int ) -> Unit > ()
78- transport.onClose = mockOnClose
7976 transport.onError = mockClosure
8077
8178 transport.readyState = Transport .ReadyState .CONNECTING
@@ -84,7 +81,6 @@ class WebSocketTransportTest {
8481 transport.onFailure(mockWebSocket, throwable, mockResponse)
8582 assertThat(transport.readyState).isEqualTo(Transport .ReadyState .CLOSED )
8683 verify(mockClosure).invoke(throwable, mockResponse)
87- verifyZeroInteractions(mockOnClose)
8884 }
8985
9086 @Test
You can’t perform that action at this time.
0 commit comments