terminate

abstract fun terminate()

Deprecated (with error)

Use cancel() instead.

Replace with

import kotlinx.coroutines.cancel
cancel()

Initiates a connection termination immediately. Termination may complete asynchronously.