Some halfopen and disconnect shenanigans