Added additional dead socket handling.