uhe
fun <T> Channel<T>.closeAndFlush(cause: Throwable? = null) { close(cause) while (poll() != null) {} }