Added basic 'not closed' logic to nio -> io loop, so we don't get
infinite hangs.