Fix NullPointerException
This commit is contained in:
parent
18ba443da6
commit
1b2d8bac80
1 changed files with 2 additions and 2 deletions
|
|
@ -191,8 +191,8 @@ class WsConnection(
|
|||
// - Handle servers that do not support WebSockets
|
||||
val error = when {
|
||||
isConnectionBrokenException(t) -> null
|
||||
isProtocolException(t) -> WebSocketNotSupportedException(response!!.code, response.message, t)
|
||||
isResponseCode(response, 401, 403) -> NotAuthorizedException(response!!.code, response.message, t)
|
||||
isProtocolException(t) && response != null -> WebSocketNotSupportedException(response.code, response.message, t)
|
||||
isResponseCode(response, 401, 403) && response != null -> NotAuthorizedException(response.code, response.message, t)
|
||||
else -> t
|
||||
}
|
||||
connectionDetailsListener(baseUrl, ConnectionState.CONNECTING, error, nextRetryTime)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue