socket shutdown tweaks