I'd probably shave a couple of allocations and do:

    val i = selector.keys.iterator
    while(i.hasNext) i.next().channel.close()