okhttp / okhttp3 / WebSocketListener / onFailure

onFailure

open fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?): Unit

Invoked when a web socket has been closed due to an error reading from or writing to the network. Both outgoing and incoming messages may have been lost. No further calls to this listener will be made.