close

open override fun close()

Cancels the transfer if it is still running, so use { } cannot leave a connection in copy mode.