corrected close-all-connections in exit proc to avoid stack dump