Improve socket errors when clients disconnect