Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/kotlin/org/phoenixframework/Transport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class WebSocketTransport(

override fun onClosing(webSocket: WebSocket, code: Int, reason: String) {
this.readyState = Transport.ReadyState.CLOSING
webSocket.close(code, reason)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also modify the WebSocketTransportTest to include this please?

    internal fun `sets ready state to CLOSING`() {
      ...

      transport.onClosing(mockWebSocket, 10, "reason")
      verify(mockWebSocket).close(10, "reason")
      ...
    }

}

override fun onMessage(webSocket: WebSocket, text: String) {
Expand All @@ -165,4 +166,4 @@ class WebSocketTransport(
this.readyState = Transport.ReadyState.CLOSED
this.onClose?.invoke(code)
}
}
}