ktor-http-cio / io.ktor.http.cio.websocket / closeExceptionally

closeExceptionally

suspend fun WebSocketSession.closeExceptionally(cause: Throwable): Unit

Closes session with normal or error close reason, depending on whether cause is cancellation or not.