closeExceptionally

suspend fun WebSocketSession.closeExceptionally(cause: Throwable)

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