Detection of socket connection failures refs #1251