ensure that the IOServer thread terminates