more socket shutdown tweaks